Although for educational purposes it is useful to code our own algorithms, scikit-learn has some very good implementations for both classification and regression problems. In this section, we will go through the implementations, as well as see how we can extract information about the generated ensembles.
Using scikit-learn
Using AdaBoost
Scikit-learn's Adaboost implementations exist in the sklearn.ensemble package, in the AdaBoostClassifier and AdaBoostRegressor classes.
Like all scikit-learn classifiers, we use the fit and predict functions in order to train the classifier and predict on the test set. The first parameter is the base classifier that the algorithm will use. The algorithm="SAMME" parameter forces...