pub type ValidMultiLogisticRegression<F> = LogisticRegressionValidParams<F, Ix2>;
Expand description
Validated version of MultiLogisticRegression
Aliased Type§
struct ValidMultiLogisticRegression<F> { /* private fields */ }
Trait Implementations§
Source§impl<C: Ord + Clone, F: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = C>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, Error> for ValidMultiLogisticRegression<F>
impl<C: Ord + Clone, F: Float, D: Data<Elem = F>, T: AsSingleTargets<Elem = C>> Fit<ArrayBase<D, Dim<[usize; 2]>>, T, Error> for ValidMultiLogisticRegression<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>
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.