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>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>,
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>where
F: Float,
T: AsMultiTargets<Elem = F>,
D: Data<Elem = F>,
impl<F, D, T> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, ElasticNetError> for MultiTaskElasticNetValidParams<F>where
F: Float,
T: AsMultiTargets<Elem = F>,
D: Data<Elem = 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.
type Object = MultiTaskElasticNet<F>
Auto Trait Implementations§
impl Freeze for ElasticNetError
impl RefUnwindSafe for ElasticNetError
impl Send for ElasticNetError
impl Sync for ElasticNetError
impl Unpin for ElasticNetError
impl UnwindSafe for ElasticNetError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.