Adds X and y to the known training data for each learner and retrains learners with the augmented dataset. 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 T
(self, X: modALinput, y: modALinput, bootstrap: bool = False, only_new: bool = False, **fit_kwargs)
| 525 | self._set_classes() |
| 526 | |
| 527 | def teach(self, X: modALinput, y: modALinput, bootstrap: bool = False, only_new: bool = False, **fit_kwargs) -> None: |
| 528 | """ |
| 529 | Adds X and y to the known training data for each learner and retrains learners with the augmented dataset. |
| 530 | Args: |
| 531 | X: The new samples for which the labels are supplied by the expert. |
| 532 | y: Labels corresponding to the new instances in X. |
| 533 | bootstrap: If True, trains each learner on a bootstrapped set. Useful when building the ensemble by bagging. |
| 534 | only_new: If True, the model is retrained using only X and y, ignoring the previously provided examples. |
| 535 | **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor. |
| 536 | """ |
| 537 | super().teach(X, y, bootstrap=bootstrap, only_new=only_new, **fit_kwargs) |
| 538 | self._set_classes() |
| 539 | |
| 540 | def predict(self, X: modALinput, **predict_proba_kwargs) -> Any: |
| 541 | """ |