shap/legacy-bar-plot
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| shap | warning | none, edit by hand | All versions |
shap.bar_plot() is a deprecated alias for bar_legacy() and emits a DeprecationWarning in SHAP 0.54.
shap.bar_plot(values, feature_names=cols)shap.plots.bar(explainer(X_val))What the rule reports
Section titled “What the rule reports”Calls to bar_plot(...) in files that import shap.
How to fix it
Section titled “How to fix it”Compute a shap.Explanation with explainer(X_val) and plot it with shap.plots.bar(explanation).
Diagnostic message
Section titled “Diagnostic message”shap.bar_plot() is the deprecated legacy bar plot and emits a DeprecationWarning. Compute an Explanation with explainer(X) and call shap.plots.bar(explanation) instead.See all rules in the shap pack.