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

Method _fit_on_new

modAL/models/base.py:259–269  ·  view source on GitHub ↗

Fits all learners to the given data and labels. Args: X: The new samples for which the labels are supplied by the expert. y: Labels corresponding to the new instances in X. bootstrap: If True, the method trains the model on a set bootstrapped from

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

Source from the content-addressed store, hash-verified

257 learner._fit_to_known(bootstrap=bootstrap, **fit_kwargs)
258
259 def _fit_on_new(self, X: modALinput, y: modALinput, bootstrap: bool = False, **fit_kwargs) -> None:
260 """
261 Fits all learners to the given data and labels.
262 Args:
263 X: The new samples for which the labels are supplied by the expert.
264 y: Labels corresponding to the new instances in X.
265 bootstrap: If True, the method trains the model on a set bootstrapped from X.
266 **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
267 """
268 for learner in self.learner_list:
269 learner._fit_on_new(X, y, bootstrap=bootstrap, **fit_kwargs)
270
271 def fit(self, X: modALinput, y: modALinput, **fit_kwargs) -> 'BaseCommittee':
272 """

Callers 1

teachMethod · 0.95

Calls 1

_fit_on_newMethod · 0.45

Tested by

no test coverage detected