1. 学习
  2. /
  3. 课程
  4. /
  5. Explainable AI in Python

Connected

练习

SHAP for explaining income levels

Practice using SHAP to analyze and visualize how each feature influences a trained model's predictions on a single sample from the income dataset, using a waterfall plot for deeper insight into feature contributions.

A trained KNN model is loaded for you. The dataset containing features is loaded in X.

说明 1 / 共 2 个

undefined XP
    1
    2
  • Create a kernel explainer for the model using a kmeans representation of the dataset X with 10 centroids.
  • Generate shap_values for the first instance in X.