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

Refactor _violin plot code and add examples #55

Open
1 of 4 tasks
thatlittleboy opened this issue May 21, 2023 · 0 comments
Open
1 of 4 tasks

Refactor _violin plot code and add examples #55

thatlittleboy opened this issue May 21, 2023 · 0 comments
Labels
good first issue Good for newcomers

Comments

@thatlittleboy
Copy link
Collaborator

thatlittleboy commented May 21, 2023

Background

violin, beeswarm and bar plots were initially housed under the same summary() function (currently stored in _beeswarm.py as summary_legacy(), see here). At some point, slundberg refactored the code to split out the various plot types into their own individual functions.

The violin() function in _violin.py was pretty much just a copy of the original implementation in summary(), and while some amount of "dead" and irrelevant (for violin plotting) code was removed in #54 , I think we can still do some improvements.

Todo

  • Refactor violin() function signature to be more like beeswarm(). Importantly, I want to deprecate the passing of numpy array to violin, and only accept Explanation objects. See how it's implemented here in beeswarm(). This will unify the APIs for the plotting functions. If users want to use the numpy array, they can use summary_legacy().
  • Ensure docstrings for violin are correct and reflect the new API.
  • Add more comprehensive tests for violin, especially using the new syntax / function signature.
  • Add a violin plotting example to the front page README and an API example notebook, like this for beeswarm.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant