How to plot the SHAP values log loss with index as x-axis
Question:
Trying to plot the shap-values of a given feature w.r.t log-loss and setting the x-axis to be the index.
as the attached image.
While from the documentation only finding the scatter
& dependence
plot which are plotting x-axis the feature values not the index (as needed)
shap.dependence_plot("feat_A", shap_lloss.values, X, interaction_index="feat_A")
Answers:
The method is called monitoring_plot
shap.monitoring_plot(ind=0,
shap_values=shap_lloss.values,
features=X,
)
Trying to plot the shap-values of a given feature w.r.t log-loss and setting the x-axis to be the index.
as the attached image.
While from the documentation only finding the scatter
& dependence
plot which are plotting x-axis the feature values not the index (as needed)
shap.dependence_plot("feat_A", shap_lloss.values, X, interaction_index="feat_A")
The method is called monitoring_plot
shap.monitoring_plot(ind=0,
shap_values=shap_lloss.values,
features=X,
)