MCPcopy Create free account
hub / github.com/modAL-python/modAL / fit

Method fit

modAL/models/learners.py:215–229  ·  view source on GitHub ↗

Interface for the fit method of the predictor. Fits the predictor to the supplied data. Args: X: The samples to be fitted. y: The corresponding labels. bootstrap: If true, trains the estimator on a set bootstrapped from X. Useful

(self, X: modALinput, y: modALinput, bootstrap: bool = False, **fit_kwargs)

Source from the content-addressed store, hash-verified

213 self.estimator.initialize()
214
215 def fit(self, X: modALinput, y: modALinput, bootstrap: bool = False, **fit_kwargs) -> 'BaseLearner':
216 """
217 Interface for the fit method of the predictor. Fits the predictor to the supplied data.
218
219 Args:
220 X: The samples to be fitted.
221 y: The corresponding labels.
222 bootstrap: If true, trains the estimator on a set bootstrapped from X.
223 Useful for building Committee models with bagging.
224 **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
225
226 Returns:
227 self
228 """
229 return self._fit_on_new(X, y, bootstrap=bootstrap, **fit_kwargs)
230
231 def teach(self, X: modALinput, y: modALinput, warm_start: bool = True, bootstrap: bool = False, **fit_kwargs) -> None:
232 """

Callers

nothing calls this directly

Calls 1

_fit_on_newMethod · 0.45

Tested by

no test coverage detected