Implementation of Gradient Boosting Classifier

Exercise

This third exercise will use gradient boosting to predict the Advertising dataset’s outcome to compare the results with the two previous algorithms.

Readers of Machine Learning for Absolute Beginners Second Edition will be familiar with the regression variant of gradient boosting. We will instead use the classification version of the algorithm in this exercise, which predicts a discrete variable and comes with slightly different hyperparameters.

1) Import libraries

This model uses the classification form of Gradient Boosting from Scikit-learn’s ensemble package.

Get hands-on with 1200+ tech skills courses.