Technical requirements
The code presented in this chapter is available in this book’s GitHub repository: https://github.com/PacktPublishing/XGBoost-for-Regression-Predictive-Modeling-and-Time-Series-Analysis.
Before diving into the code and explanations, make sure you have all the necessary libraries installed. The recommended method is to install them using pip
. You’ll be using the following Python packages in this chapter:
- shap
- lime
- eli5
- scipy version 1.7.3
- sklearn version 0.24.2
Please note that due to compatibility issues among the lime, SciPy, and scikit-learn libraries, you’ll need to install the aforementioned versions of scikit-learn and SciPy.
All examples in this chapter are based on the California housing dataset, which you used previously in Chapter 4. This dataset predicts housing price values based on several features.