跳至內容

SageMaker Canvas - Shap Value

0

In SageMaker Canvas, is it possible to extract both global and local SHAP values during model building?

已提問 5 個月前檢視次數 41 次
1 個回答
0

Yes, Amazon SageMaker Canvas leverages SageMaker Clarify's capabilities to provide both global and local SHAP values during model building.

SageMaker Clarify processing jobs use the Kernel SHAP algorithm to compute feature attributions. These jobs produce both local and global SHAP values:

  • Local SHAP values represent the feature importance for each individual instance or prediction
  • Global SHAP values aggregate the local SHAP values across all instances in the dataset

When configuring SHAP analysis, you can use the SHAPConfig object which includes parameters like:

  • baseline - Dataset used as the baseline in the Kernel SHAP algorithm
  • num_samples - Number of samples used in the algorithm
  • agg_method - Aggregation method for global SHAP values (options include mean_abs, median, mean_sq)
  • save_local_shap_values - Boolean indicator of whether to save the local SHAP values (default is False)

Global SHAP analysis results are typically stored in the explanations section of the analysis file under the kernel_shap method, while local SHAP values are saved to files like explanations_shap/out.csv for tabular datasets or explanations_shap/out.jsonl for NLP explainability analysis.

SHAP values help determine the contribution of each feature towards model predictions, providing valuable insights for model interpretation and understanding feature importance.
Sources
Analysis Results - Amazon SageMaker
Create a SHAP Baseline for Models in Production - Amazon SageMaker

已回答 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。