AdaBoostClassifier
An AdaBoost 1 classifier is a meta-estimator that begins by fitting a classifier on the original dataset and then fits additional copies of the classifier on the same dataset but where the weights of incorrectly classified instances are adjusted such that subsequent classifiers focus more on difficult cases.
For each incoming observation, each model's learn_one method is called k times where k is sampled from a Poisson distribution of parameter lambda. The lambda parameter is updated when the weaks learners fit successively the same observation.
Parameters
-
base_model(
Model
) → The classifier to boost. -
n_models(Default:
10
) → The number of models in the ensemble. -
n_classes(
int
) → The number of classes for the classifier. -
seed(
int
, Default:0
) → Random number generator seed for reproducibility.
Example Usage
We can create an instance and deploy AdaBoostClassifier model like this.
import turboml as tb
model = tb.AdaBoostClassifier(n_classes=2,base_model = tb.HoeffdingTreeClassifier(n_classes=2))
Footnotes
-
Y. Freund, R. Schapire, “A Decision-Theoretic Generalization of on-Line Learning and an Application to Boosting”, 1995. ↩