Real Python Podcast Episode #169 Title Artwork

Episode 169: Improving Classification Models With XGBoost

The Real Python Podcast

Aug 25, 2023 1h 5m

How can you improve a classification model while avoiding overfitting? Once you have a model, what tools can you use to explain it to others? This week on the show, we talk with author and Python trainer Matt Harrison about his new book Effective XGBoost: Tuning, Understanding, and Deploying Classification Models.

Episode Sponsor:

Matt talks about the process of developing the book and how he wanted it to be an interactive experience for the reader. He explains the concept of gradient boosting and provides metaphors for developing a model. He shares his appreciation for exploratory data analysis as a crucial step in understanding your data.

He also shares additional libraries to help you explain your model. We discuss how difficult it is to develop the story of how the model works to share it with stakeholders.

He illustrates why covering the complete process is essential, from exploring data and building a model to finally deploying it. He shares many of the tools he found along the way.

This week’s episode is brought to you by Scout APM.


  • 00:00:00 – Introduction
  • 00:02:16 – Starting on the book
  • 00:04:36 – What is tabular prediction?
  • 00:06:50 – Who could leverage XGBoost?
  • 00:09:46 – Background to get started
  • 00:11:50 – Using XGBoost to explore data
  • 00:21:06 – Sponsor: ScoutAPM
  • 00:21:54 – Focusing on using the tool
  • 00:26:37 – Not being a developer
  • 00:30:53 – Contrasting XGBoost and logistic regression
  • 00:41:57 – Video Course Spotlight
  • 00:43:21 – Using SHAP to explain the model
  • 00:48:06 – Working with hyperparameters
  • 00:51:40 – Deploying your model
  • 00:53:09 – XGBoost Feature Interactions Reshaped (XGBFIR)
  • 00:55:47 – Communicating the story of a model
  • 00:57:57 – How to find the book
  • 00:59:07 – What are you excited about in the world of Python?
  • 01:02:46 – What do you want to learn next?
  • 01:03:12 – How can people follow what you do online?
  • 01:03:59 – Thanks and goodbye

Show Links: