ContextualBanditModelSelection
Contextual Bandit-based model selection.
Similar to BanditModelSelection, but now the algorithm uses a contextual bandit leading to more fine-grained model selection.
Parameters
-
contextualbandit(Default:
LinTS
) → The underlying bandit algorithm. Options are: LinTS, and LinUCB. -
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.ContextualBanditModelSelection(base_models = [htc_model, amf_model, ffm_model])