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

Connected

Exercise

Evaluating SHAP explanation consistency

Evaluate the consistency of feature importance explanations using SHAP values across two different subsets of the insurance dataset.

The subsets X1, X2, y1, and y2 have been pre-loaded for you along with model1 trained on the first subset and model2 trained on the second subset.

Instructions

100 XP
  • Calculate shap_values1 and feature_importance1 for model1.
  • Calculate shap_values2 and feature_importance2 for model2.
  • Calculate consistency between feature importances.