Dash Shap Components

Hello dash community!

Pleased to announce that I have created my first dash component(s), by making the shapjs react components dash-compatible, available from PyPI

pip install dash-shap-components

Refer to usage.py for examples

Special thanks to original implementation in shap library and plotly team for dash-component-boilerplate.

Do let me know if you have any comments / feedback!



Really nice! Thanks for publishing :raised_hands:

Would you mind sharing some screenshots of what the output looks like? I think that’ll help inspire folks that aren’t already familiar with shap :slight_smile:

Very nice!

I noticed an error when I select this option:

There’s also a dialog popup every time I click on the SHAP graph; any way to disable that?

Otherwise it looks great!

1 Like

Many thanks for the feedback @chriddyp , @xhlu !

I’m unable to replicate the “e[(e.length - 1)] is undefined” error at my end, I could locate the snippet in shapjs and it seems fine to me.
The popup is coming from an anonymous event listener from underlying library, I’ll be shortly releasing the next version with the popups & excessive console logging suppressed.

How do you create those interactive screenshots? I’ve been trying to capture similar screenshots for the Readme.


In windows I use licecap.

For the error, have you tried clicking on the dropdown (circled in red) and select other options? I was playing with that when I got the error

Weird, I can’t get the error for any combination I try, anyways seems to be benign as the component is still functional for you. I’ll be more than happy if someone raises a PR with the fix.

FYI the popup change I mentioned is now available on PyPI, as version 0.0.2, and I have made improvements to the README as Chris mentioned (thanks for licecap!)


1 Like