Search⌘ K

Feature Importance

Explore how to evaluate the importance of dataset features in predicting outcomes using XGBoost. Learn to access the feature_importances_ property and create visualizations with matplotlib, including customizing importance metrics and display options.

Chapter Goals:

  • Understand how to measure each dataset feature's importance in making model predictions
  • Use the matplotlib pyplot API to save a feature importance plot to a file

A. Determining important features

Not every feature in a dataset is used equally for helping a boosted decision tree make predictions. Certain features are more important than others, and it is ...