Use Shap to evaluate the feature importance in XGBoost models
Shap is not available from the sklearn API to XGBoost so I added a wrapper around XGBoost to include it
Select the features to be tested
Sometimes some features are known to be important, so there is no benefit in testing them. Removing these features allows to save computing time and memory.
Miscellaneous
rewrite np.int to int, np.float to float and np.bool to bool to avoid deprecation warnings
Use Shap to evaluate the feature importance in XGBoost models
Shap is not available from the sklearn API to XGBoost so I added a wrapper around XGBoost to include it
Select the features to be tested
Sometimes some features are known to be important, so there is no benefit in testing them. Removing these features allows to save computing time and memory.
Miscellaneous
rewrite np.int to int, np.float to float and np.bool to bool to avoid deprecation warnings