Incrementally fit the model to data, for each output variable. Parameters ---------- X : {array-like, sparse matrix} of shape (n_samples, n_features) The input data. y : {array-like, sparse matrix} of shape (n_samples, n_outputs) Multi-output
(self, X, y, sample_weight=None, **partial_fit_params)
| 410 | |
| 411 | @_available_if_estimator_has("partial_fit") |
| 412 | def partial_fit(self, X, y, sample_weight=None, **partial_fit_params): |
| 413 | """Incrementally fit the model to data, for each output variable. |
| 414 | |
| 415 | Parameters |
| 416 | ---------- |
| 417 | X : {array-like, sparse matrix} of shape (n_samples, n_features) |
| 418 | The input data. |
| 419 | |
| 420 | y : {array-like, sparse matrix} of shape (n_samples, n_outputs) |
| 421 | Multi-output targets. |
| 422 | |
| 423 | sample_weight : array-like of shape (n_samples,), default=None |
| 424 | Sample weights. If `None`, then samples are equally weighted. |
| 425 | Only supported if the underlying regressor supports sample |
| 426 | weights. |
| 427 | |
| 428 | **partial_fit_params : dict of str -> object |
| 429 | Parameters passed to the ``estimator.partial_fit`` method of each |
| 430 | sub-estimator. |
| 431 | |
| 432 | Only available if `enable_metadata_routing=True`. See the |
| 433 | :ref:`User Guide <metadata_routing>`. |
| 434 | |
| 435 | .. versionadded:: 1.3 |
| 436 | |
| 437 | Returns |
| 438 | ------- |
| 439 | self : object |
| 440 | Returns a fitted instance. |
| 441 | """ |
| 442 | super().partial_fit(X, y, sample_weight=sample_weight, **partial_fit_params) |
| 443 | |
| 444 | |
| 445 | class MultiOutputClassifier(ClassifierMixin, _MultiOutputEstimator): |
no outgoing calls