Passer au contenu

SageMaker Canvas - Shap Value

0

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

demandé il y a 5 mois36 vues
1 réponse
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

répondu il y a 5 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.