3- Gradient Boosting

This lesson will provide an overview of gradient boosting and the steps involved in its implementation.

We'll cover the following

Introduction to gradient boosting

Like random forests, boosting provides yet another regression/classification technique for aggregating the outcome of multiple decision trees.

Rather than building random independent variants of a decision tree in parallel, GBGradient Boosting is a sequential method that aims to improve the performance of each subsequent tree. This works by evaluating the performance of weak models and then overweighting subsequent models to mitigate the outcome of instances misclassified in earlier rounds. Instances classified correctly at the previous round are replaced with a higher proportion of instances that weren’t accurately classified.

While this creates another weak model, the modifications derived from the previous model help the new model to key in on the previous tree’s mistakes. The adaptability of the algorithm to learn from its mistakes makes gradient boosting one of the most popular algorithms in machine learning today.

The following steps are involved in the implementation of GB:

  • 1 - Import libraries
  • 2 - Import dataset
  • 3 - Convert non-numeric variables
  • 4 - Remove variables
  • 5 - Set X and y variables
  • 6 - Set algorithm
  • 7 - Evaluate

Get hands-on with 1200+ tech skills courses.