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

Method _add_training_data

modAL/models/base.py:235–246  ·  view source on GitHub ↗

Adds the new data and label to the known data for each learner, but does not retrain the model. Args: X: The new samples for which the labels are supplied by the expert. y: Labels corresponding to the new instances in X. Note: If the learn

(self, X: modALinput, y: modALinput)

Source from the content-addressed store, hash-verified

233 return len(self.learner_list)
234
235 def _add_training_data(self, X: modALinput, y: modALinput) -> None:
236 """
237 Adds the new data and label to the known data for each learner, but does not retrain the model.
238 Args:
239 X: The new samples for which the labels are supplied by the expert.
240 y: Labels corresponding to the new instances in X.
241 Note:
242 If the learners have been fitted, the features in X have to agree with the training samples which the
243 classifier has seen.
244 """
245 for learner in self.learner_list:
246 learner._add_training_data(X, y)
247
248 def _fit_to_known(self, bootstrap: bool = False, **fit_kwargs) -> None:
249 """

Callers 1

teachMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected