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.

Shap Values w.r.t log-loss

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")
Asked By: Marwan Mostafa

||

Answers:

The method is called monitoring_plot

shap.monitoring_plot(ind=0, 
                     shap_values=shap_lloss.values,
                     features=X,
                     )

Documentation

Answered By: Marwan Mostafa
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.