XGBoost case study

XGBoost is an ensemble algorithm popular for its outstanding performance. An ensemble algorithm involves multiple models instead of just one. Ensemble algorithms are of two types:

  • Bagging: Here, a result from the algorithm is the average of results from individual models.
  • Boosting: Here, we start from a base learner model. Each successive model gets created with better-trained parameters. The learning of new parameters happens through optimization algorithms such as gradient descent.

Next, we will look at the application of XGBoost on a dataset to predict the testing time of a newly manufactured car.

It is a step-by-step guide and you can just follow along:

  1. Import the required packages:
# In[1]:    import os
    import pandas ...

Get Mastering pandas - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.