Gradient Boosting

What is gradient boosting

Gradient boosting is an Ensemble Learning algorithm that combines several weak models, typically decision trees, to create a more accurate and robust model.

How it works

  1. Initialize the model with a simple model or a constant value that best fits the data.

  2. Train a weak model, such as a decision tree, on the training data.

  3. Use the weak model to make predictions on the training data.

  4. Compute the residuals, or the difference between the predicted values and the actual values, for each training example.

  5. Train another weak model on the residuals from the previous model.

  6. Combine the predictions from the previous weak model and the new weak model to get an updated prediction.

  7. Repeat steps 4 to 6 until a stopping criteria is met, such as a maximum number of iterations or a minimum improvement in the loss function.

  8. Use the final model to make predictions on new data.

Why it is called "gradient boosting"?

  • because it uses a gradient descent procedure to minimize the loss when adding new learners to the ensemble.
  • The key idea behind gradient boosting is that each new weak model is trained to fit the residuals of the previous model, which allows the model to focus on the most challenging examples.

Gradient-boosted Trees

= when the weak learner is Classification and Regression Decision Tree & Random Forest#Decision Tree in gradient boosting

How it works Pasted image 20230709123115.png|600

Hyperparameters

Pros & Cons

Pros

Cons

XGBoost (Extreme Gradient Boosting)

Xgboost

They are both Ensemble Learning models based on decision tree model. But XGBoost is a Ensemble Learning#Boosting model, whereas Random forest is Ensemble Learning#Bagging (Bootstrap Aggregating) model.

Features

LightGBM (light gradient-boosting machine)

#TODO