Enum linfa_linear::LinearError [−][src]
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
Argmin(Error)
Errors encountered when using argmin’s solver
Tuple Fields of Argmin
0: Error
BaseCrate(Error)
Tuple Fields of BaseCrate
0: Error
LinalgError(LinalgError)
Tuple Fields of LinalgError
0: LinalgError
Trait Implementations
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>
Performs the conversion.