pub enum ElasticNetError {
NotEnoughSamples,
IllConditioned,
InvalidL1Ratio(f32),
InvalidPenalty(f32),
InvalidTolerance(f32),
IncorrectTargetShape,
BaseCrate(Error),
}
Expand description
Error variants from hyperparameter construction or model estimation
Variants§
NotEnoughSamples
The input has not enough samples
IllConditioned
The input is singular
InvalidL1Ratio(f32)
InvalidPenalty(f32)
InvalidTolerance(f32)
IncorrectTargetShape
BaseCrate(Error)
Trait Implementations§
source§impl Clone for ElasticNetError
impl Clone for ElasticNetError
source§fn clone(&self) -> ElasticNetError
fn clone(&self) -> ElasticNetError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ElasticNetError
impl Debug for ElasticNetError
source§impl Display for ElasticNetError
impl Display for ElasticNetError
source§impl Error for ElasticNetError
impl Error for ElasticNetError
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for ElasticNetValidParams<F>
impl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for ElasticNetValidParams<F>
source§fn fit(
&self,
dataset: &DatasetBase<ArrayBase<D, Ix2>, T>
) -> Result<Self::Object>
fn fit( &self, dataset: &DatasetBase<ArrayBase<D, Ix2>, T> ) -> Result<Self::Object>
Fit an elastic net model given a feature matrix x
and a target
variable y
.
The feature matrix x
must have shape (n_samples, n_features)
The target variable y
must have shape (n_samples)
Returns a FittedElasticNet
object which contains the fitted
parameters and can be used to predict
values of the target variable
for new feature values.
type Object = ElasticNet<F>
source§impl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for MultiTaskElasticNetValidParams<F>
impl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for MultiTaskElasticNetValidParams<F>
source§fn fit(
&self,
dataset: &DatasetBase<ArrayBase<D, Ix2>, T>
) -> Result<Self::Object>
fn fit( &self, dataset: &DatasetBase<ArrayBase<D, Ix2>, T> ) -> Result<Self::Object>
Fit a multi-task Elastic Net model given a feature matrix x
and a target
matrix y
.
The feature matrix x
must have shape (n_samples, n_features)
The target variable y
must have shape (n_samples, n_tasks)
Returns a FittedMultiTaskElasticNet
object which contains the fitted
parameters and can be used to predict
values of the target variables
for new feature values.