Type Definition linfa_logistic::ValidLogisticRegression [−][src]
pub type ValidLogisticRegression<F> = LogisticRegressionValidParams<F, Ix1>;
Expand description
Validated version of LogisticRegression
Trait Implementations
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.