TabularPredictor.fit_pseudolabel#
- TabularPredictor.fit_pseudolabel(pseudo_data: DataFrame, max_iter: int = 5, return_pred_prob: bool = False, use_ensemble: bool = False, fit_ensemble: bool = False, fit_ensemble_every_iter: bool = False, **kwargs)[source]#
If ‘pseudo_data’ is labeled then incorporates all test_data into train_data for newly fit models. If ‘pseudo_data’ is unlabeled then ‘fit_pseudolabel’ will self label the data and will augment the original training data by adding all the self labeled data that meets a criteria (For example all rows with predictive prob above 95%). If predictor is fit then will call fit_extra with added training data, if predictor is not fit then will fit model on train_data then run.
- Parameters
pseudo_data (str or
TabularDataset
orpd.DataFrame
) – Extra data to incorporate into training. Pre-labeled test data allowed. If no labels then pseudolabeling algorithm will predict and filter out which rows to incorporate into trainingmax_iter (int, default = 5) – Maximum iterations of pseudolabeling allowed
return_pred_prob (bool, default = False) – Returns held-out predictive probabilities from pseudo-labeling. If test_data is labeled then returns model’s predictive probabilities.
use_ensemble (bool, default = False) – If True will use ensemble pseudo labeling algorithm. If False will just use best model for pseudo labeling algorithm.
fit_ensemble (bool, default = False) – If True with fit weighted ensemble model using combination of best models. Fitting weighted ensemble will be done after fitting has being completed unless otherwise specified. If False will not fit weighted ensemble over models trained with pseudo labeling and models trained without it.
fit_ensemble_every_iter (bool, default = False) – If True fits weighted ensemble model for every iteration of pseudo labeling algorithm. If False and fit_ensemble is True will fit after all pseudo labeling training is done.
kwargs (dict) – If predictor is not already fit, then kwargs are for the functions ‘fit’ and ‘fit_extra’: Refer to parameters documentation in
TabularPredictor.fit()
. Refer to parameters documentation inTabularPredictor.fit_extra()
. If predictor is fit kwargs are for ‘fit_extra’: Refer to parameters documentation inTabularPredictor.fit_extra()
.
- Returns
self – Returns self, which is a Python class of TabularPredictor
- Return type