package sklearn
Module Multioutput.MultiOutputEstimatorSource
val fit :
?sample_weight:[> `ArrayLike ] Np.Obj.t ->
?fit_params:(string * Py.Object.t) list ->
x:[> `Spmatrix ] Np.Obj.t ->
y:[> `Spmatrix ] Np.Obj.t ->
[> tag ] Obj.t ->
tFit the model to data. Fit a separate model for each output variable.
Parameters ---------- X : (sparse) array-like, shape (n_samples, n_features) Data.
y : (sparse) array-like, shape (n_samples, n_outputs) Multi-output targets. An indicator matrix turns on multilabel estimation.
sample_weight : array-like of shape (n_samples,), default=None Sample weights. If None, then samples are equally weighted. Only supported if the underlying regressor supports sample weights.
**fit_params : dict of string -> object Parameters passed to the ``estimator.fit`` method of each step.
Returns ------- self : object
Get parameters for this estimator.
Parameters ---------- deep : bool, default=True If True, will return the parameters for this estimator and contained subobjects that are estimators.
Returns ------- params : mapping of string to any Parameter names mapped to their values.
val partial_fit :
?classes:[> `ArrayLike ] Np.Obj.t list ->
?sample_weight:[> `ArrayLike ] Np.Obj.t ->
x:[> `Spmatrix ] Np.Obj.t ->
y:[> `Spmatrix ] Np.Obj.t ->
[> tag ] Obj.t ->
tIncrementally fit the model to data. Fit a separate model for each output variable.
Parameters ---------- X : (sparse) array-like, shape (n_samples, n_features) Data.
y : (sparse) array-like, shape (n_samples, n_outputs) Multi-output targets.
classes : list of numpy arrays, shape (n_outputs) Each array is unique classes for one output in str/int Can be obtained by via ``np.unique(y[:, i]) for i in range(y.shape[1])``, where y is the target matrix of the entire dataset. This argument is required for the first call to partial_fit and can be omitted in the subsequent calls. Note that y doesn't need to contain all labels in `classes`.
sample_weight : array-like of shape (n_samples,), default=None Sample weights. If None, then samples are equally weighted. Only supported if the underlying regressor supports sample weights.
Returns ------- self : object
Predict multi-output variable using a model trained for each target variable.
Parameters ---------- X : (sparse) array-like, shape (n_samples, n_features) Data.
Returns ------- y : (sparse) array-like, shape (n_samples, n_outputs) Multi-output targets predicted across multiple predictors. Note: Separate models are generated for each predictor.
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form ``<component>__<parameter>`` so that it's possible to update each component of a nested object.
Parameters ---------- **params : dict Estimator parameters.
Returns ------- self : object Estimator instance.
Pretty-print the object to a formatter.