Ensembles
Bandit Model Selection

BanditModelSelection

Bandit-based model selection.

Each model is associated with an arm, in a multi-arm bandit scenario. The bandit algorithm is used to decide which models to update on new data. The reward of the bandit is the performance of the model on that sample. Fo prediction, we always use the current best model based on the bandit.

Parameters

  • bandit(Default:EpsGreedy) → The underlying bandit algorithm. Options are: EpsGreedy, UCB, and GaussianTS.

  • metric_name(Default:WindowedMAE) → The metric to use to evaluate models. Options are: WindowedAUC, WindowedAccuracy, WindowedMAE, WindowedMSE, and WindowedRMSE.

  • base_models(list[Model]) → The list of models over which to perform model selection.

Example Usage

We can create an instance and deploy BanditModel like this.

import turboml as tb
htc_model = tb.HoeffdingTreeRegressor()
amf_model = tb.AMFRegressor()
ffm_model = tb.FFMRegressor()
bandit_model = tb.BanditModelSelection(base_models = [htc_model, amf_model, ffm_model])