Enum linfa_elasticnet::ElasticNetError
source · [−]pub enum ElasticNetError {
NotEnoughSamples,
IllConditioned,
InvalidL1Ratio(f32),
InvalidPenalty(f32),
InvalidTolerance(f32),
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)
BaseCrate(Error)
Trait Implementations
sourceimpl Clone for ElasticNetError
impl Clone for ElasticNetError
sourcefn clone(&self) -> ElasticNetError
fn clone(&self) -> ElasticNetError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ElasticNetError
impl Debug for ElasticNetError
sourceimpl Display for ElasticNetError
impl Display for ElasticNetError
sourceimpl Error for ElasticNetError
impl Error for ElasticNetError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for ElasticNetValidParams<F> where
F: Float,
D: Data<Elem = F>,
T: AsSingleTargets<Elem = F>,
impl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for ElasticNetValidParams<F> where
F: Float,
D: Data<Elem = F>,
T: AsSingleTargets<Elem = F>,
sourcefn 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>
Auto Trait Implementations
impl RefUnwindSafe for ElasticNetError
impl Send for ElasticNetError
impl Sync for ElasticNetError
impl Unpin for ElasticNetError
impl UnwindSafe for ElasticNetError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more