#[non_exhaustive]pub enum LinearError<F: Float> {
Argmin(Error),
BaseCrate(Error),
NotEnoughSamples,
NotEnoughTargets,
InvalidPenalty(F),
InvalidTweediePower(F),
InvalidTargetRange(F),
LinalgError(LinalgError),
}
Expand description
An error when modeling a Linear algorithm
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Argmin(Error)
Errors encountered when using argmin’s solver
BaseCrate(Error)
NotEnoughSamples
NotEnoughTargets
InvalidPenalty(F)
InvalidTweediePower(F)
InvalidTargetRange(F)
LinalgError(LinalgError)
Trait Implementations§
Source§impl<F> Display for LinearError<F>
impl<F> Display for LinearError<F>
Source§impl<F: Float> Error for LinearError<F>
impl<F: Float> Error for LinearError<F>
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: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, LinearError<F>> for IsotonicRegression
impl<F: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, LinearError<F>> for IsotonicRegression
Source§fn fit(
&self,
dataset: &DatasetBase<ArrayBase<D, Ix2>, T>,
) -> Result<Self::Object, F>
fn fit( &self, dataset: &DatasetBase<ArrayBase<D, Ix2>, T>, ) -> Result<Self::Object, F>
Fit an isotonic regression model given a feature matrix X
and a target
variable y
.
The feature matrix X
must have shape (n_samples, 1)
The target variable y
must have shape (n_samples)
Returns a FittedIsotonicRegression
object which contains the fitted
parameters and can be used to predict
values of the target variable
for new feature values.
type Object = FittedIsotonicRegression<F>
Source§impl<F: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, LinearError<F>> for LinearRegression
impl<F: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, LinearError<F>> for LinearRegression
Source§fn fit(
&self,
dataset: &DatasetBase<ArrayBase<D, Ix2>, T>,
) -> Result<Self::Object, F>
fn fit( &self, dataset: &DatasetBase<ArrayBase<D, Ix2>, T>, ) -> Result<Self::Object, F>
Fit a linear regression 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 FittedLinearRegression
object which contains the fitted
parameters and can be used to predict
values of the target variable
for new feature values.
type Object = FittedLinearRegression<F>
Source§impl<F, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, LinearError<F>> for TweedieRegressorValidParams<F>where
Array1<F>: ArgminAdd<Array1<F>, Array1<F>> + ArgminSub<Array1<F>, Array1<F>> + ArgminSub<F, Array1<F>> + ArgminAdd<F, Array1<F>> + ArgminMul<F, Array1<F>> + ArgminMul<Array1<F>, Array1<F>> + ArgminDot<Array1<F>, F> + ArgminL2Norm<F> + ArgminL1Norm<F> + ArgminSignum + ArgminMinMax,
F: ArgminMul<Array1<F>, Array1<F>> + ArgminZero + Float,
impl<F, D: Data<Elem = F>, T: AsSingleTargets<Elem = F>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, LinearError<F>> for TweedieRegressorValidParams<F>where
Array1<F>: ArgminAdd<Array1<F>, Array1<F>> + ArgminSub<Array1<F>, Array1<F>> + ArgminSub<F, Array1<F>> + ArgminAdd<F, Array1<F>> + ArgminMul<F, Array1<F>> + ArgminMul<Array1<F>, Array1<F>> + ArgminDot<Array1<F>, F> + ArgminL2Norm<F> + ArgminL1Norm<F> + ArgminSignum + ArgminMinMax,
F: ArgminMul<Array1<F>, Array1<F>> + ArgminZero + Float,
Source§impl<F: Float> From<LinalgError> for LinearError<F>
impl<F: Float> From<LinalgError> for LinearError<F>
Source§fn from(source: LinalgError) -> Self
fn from(source: LinalgError) -> Self
Auto Trait Implementations§
impl<F> Freeze for LinearError<F>where
F: Freeze,
impl<F> RefUnwindSafe for LinearError<F>where
F: RefUnwindSafe,
impl<F> Send for LinearError<F>
impl<F> Sync for LinearError<F>
impl<F> Unpin for LinearError<F>
impl<F> UnwindSafe for LinearError<F>where
F: UnwindSafe,
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> 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