pub trait Fit<DM: DesignMatrix, T: AsMultiTargets, E: Error> {
type Object;
// Required method
fn fit(&self, dataset: &DatasetBase<DM, T>) -> Result<Self::Object, E>;
}Expand description
The Fit trait allows an estimator to be fitted to a dataset (a combination
of design matrix and targets). More formally, the model estimates coefficients
that minimizes an objective.
Required Associated Types§
Required Methods§
fn fit(&self, dataset: &DatasetBase<DM, T>) -> Result<Self::Object, E>
Implementors§
Source§impl<DM, T, E, P> Fit<DM, T, E> for Pwhere
DM: DesignMatrix,
T: AsMultiTargets,
P: ParamGuard,
P::Checked: Fit<DM, T, E>,
E: Error + From<P::Error>,
Performs checking step and calls fit on the checked hyperparameters. If checking failed, the
checking error is converted to the original error type of Fit and returned.
impl<DM, T, E, P> Fit<DM, T, E> for Pwhere
DM: DesignMatrix,
T: AsMultiTargets,
P: ParamGuard,
P::Checked: Fit<DM, T, E>,
E: Error + From<P::Error>,
Performs checking step and calls fit on the checked hyperparameters. If checking failed, the
checking error is converted to the original error type of Fit and returned.
Source§impl<F: Float, S: Data<Elem = F>, T: AsMultiTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for BlockMCPValidParams<F>
This implements the block coordinate descent optimization procedure for
multi-task problems and dense design matrices.
impl<F: Float, S: Data<Elem = F>, T: AsMultiTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for BlockMCPValidParams<F>
This implements the block coordinate descent optimization procedure for multi-task problems and dense design matrices.
type Object = BlockMCPEstimator<F>
Source§impl<F: Float, S: Data<Elem = F>, T: AsMultiTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for MultiTaskElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for
single-task problems and dense design matrices.
impl<F: Float, S: Data<Elem = F>, T: AsMultiTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for MultiTaskElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for single-task problems and dense design matrices.
type Object = MultiTaskElasticNet<F>
Source§impl<F: Float, S: Data<Elem = F>, T: AsMultiTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for MultiTaskLassoValidParams<F>
This implements the block coordinate descent optimization procedure for multi-task
problem and dense design matrices.
impl<F: Float, S: Data<Elem = F>, T: AsMultiTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for MultiTaskLassoValidParams<F>
This implements the block coordinate descent optimization procedure for multi-task problem and dense design matrices.
type Object = MultiTaskLasso<F>
Source§impl<F: Float, S: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for ElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for
single-task problems and dense design matrices.
impl<F: Float, S: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for ElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for single-task problems and dense design matrices.
type Object = ElasticNet<F>
Source§impl<F: Float, S: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for LassoValidParams<F>
This implements the coordinate descent optimization procedure for single-task
problem and dense design matrices.
impl<F: Float, S: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for LassoValidParams<F>
This implements the coordinate descent optimization procedure for single-task problem and dense design matrices.
Source§impl<F: Float, S: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for MCPValidParams<F>
This implements the coordinate descent optimization procedure for single-task
problems and dense design matrices.
impl<F: Float, S: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<S, Dim<[usize; 2]>>, T, EstimatorError> for MCPValidParams<F>
This implements the coordinate descent optimization procedure for single-task problems and dense design matrices.
type Object = MCPEstimator<F>
Source§impl<F: Float, T: AsMultiTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for BlockMCPValidParams<F>
This implements the block coordinate descent optimization procedure for
multi-task problems and sparse design matrices.
impl<F: Float, T: AsMultiTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for BlockMCPValidParams<F>
This implements the block coordinate descent optimization procedure for multi-task problems and sparse design matrices.
type Object = BlockMCPEstimator<F>
Source§impl<F: Float, T: AsMultiTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for MultiTaskElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for
single-task problems and sparse design matrices.
impl<F: Float, T: AsMultiTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for MultiTaskElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for single-task problems and sparse design matrices.
type Object = MultiTaskElasticNet<F>
Source§impl<F: Float, T: AsMultiTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for MultiTaskLassoValidParams<F>
This implements the block coordinate descent optimization procedure for
multi-task problem and sparse design matrices.
impl<F: Float, T: AsMultiTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for MultiTaskLassoValidParams<F>
This implements the block coordinate descent optimization procedure for multi-task problem and sparse design matrices.
type Object = MultiTaskLasso<F>
Source§impl<F: Float, T: AsSingleTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for ElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for
single-task problems and sparse design matrices.
impl<F: Float, T: AsSingleTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for ElasticNetValidParams<F>
This implements the coordinate descent optimization procedure for single-task problems and sparse design matrices.
type Object = ElasticNet<F>
Source§impl<F: Float, T: AsSingleTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for LassoValidParams<F>
This implements the coordinate descent optimization procedure for single-task
problem and sparse design matrices.
impl<F: Float, T: AsSingleTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for LassoValidParams<F>
This implements the coordinate descent optimization procedure for single-task problem and sparse design matrices.
Source§impl<F: Float, T: AsSingleTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for MCPValidParams<F>
This implements the coordinate descent optimization procedure for single-task
problems and sparse design matrices.
impl<F: Float, T: AsSingleTargets<Elem = F>> Fit<CSCArray<'_, F>, T, EstimatorError> for MCPValidParams<F>
This implements the coordinate descent optimization procedure for single-task problems and sparse design matrices.