pub enum Error {
    LinfaError(Error),
    WrongNumberOfClasses,
    ArgMinError(Error),
    MismatchedShapes(usizeusize),
    InvalidValues,
    InitialParameterFeaturesMismatch {
        rows: usize,
        n_features: usize,
    },
    InitialParameterClassesMismatch {
        cols: usize,
        n_classes: usize,
    },
    InvalidGradientTolerance,
    InvalidAlpha,
    InvalidInitialParameters,
}

Variants

LinfaError(Error)

WrongNumberOfClasses

ArgMinError(Error)

MismatchedShapes(usizeusize)

InvalidValues

InitialParameterFeaturesMismatch

Fields

rows: usize
n_features: usize

InitialParameterClassesMismatch

Fields

cols: usize
n_classes: usize

InvalidGradientTolerance

InvalidAlpha

InvalidInitialParameters

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Given a 2-dimensional feature matrix array x with shape (n_samples, n_features) and an array of target classes to predict, create a FittedLinearRegression object which allows making predictions.

The array of target classes y must have exactly two discrete values, (e.g. 0 and 1, “cat” and “dog”, …), which represent the two different classes the model is supposed to predict.

The array y must also have exactly n_samples items, i.e. exactly as many items as there are rows in the feature matrix x.

This method returns an error if any of the preconditions are violated, i.e. any values are Inf or NaN, y doesn’t have as many items as x has rows, or if other parameters (gradient_tolerance, alpha) have been set to inalid values.

Given a 2-dimensional feature matrix array x with shape (n_samples, n_features) and an array of target classes to predict, create a MultiFittedLogisticRegression object which allows making predictions. The target classes can have any number of discrete values.

This method returns an error if any of the preconditions are violated, i.e. any values are Inf or NaN, y doesn’t have as many items as x has rows, or if other parameters (gradient_tolerance, alpha) have been set to inalid values. The input features are also strongly recommended to be normalized to ensure numerical stability.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.