1. Learn
  2. /
  3. Courses
  4. /
  5. Explainable AI in Python

Connected

Exercise

Finding key heart disease predictors with SHAP

Your task is to use SHAP to understand how different features in a pre-trained RandomForestClassifier model influence predictions for heart disease.

X containing the features and y containing the labels, and the random forest classifier model have been pre-loaded for you.

Instructions

100 XP
  • Create a SHAP tree explainer named explainer.
  • Compute shap_values.
  • Compute the mean absolute SHAP values mean_abs_shap.