Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix explain shap_summary_plot when one column is full of zeros or NaNs #15743

Closed
tomasfryda opened this issue Sep 12, 2023 · 1 comment
Closed
Assignees
Labels
Milestone

Comments

@tomasfryda
Copy link
Contributor

Problem is with matplotlib 3.7.1 but it seems to be fixed in 3.7.2.

---------------------------------------------------------------------------
StopIteration                             Traceback (most recent call last)
   3247     result["shap_summary"]["plots"] = H2OExplanation()
   3248     for tree_model in tree_models_to_show:
-> 3249         result["shap_summary"]["plots"][tree_model.model_id] = display(shap_summary_plot(
   3250             tree_model,
   3251             **_custom_args(
   3252                 plot_overrides.get("shap_summary_plot"),
   3253                 frame=frame,
   3254                 figsize=figsize
   3255             )))
   3257 # PDP
   3258 if "pdp" in explanations:
...
...
...
File .../python3.8/site-packages/matplotlib/cbook/__init__.py:1715, in _safe_first_finite(obj, skip_nonfinite)
   1712     raise RuntimeError("matplotlib does not "
   1713                        "support generators as input")
   1714 else:
-> 1715     return next(val for val in obj if safe_isfinite(val))
@tomasfryda
Copy link
Contributor Author

fixed in #15734

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant