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

ENH: add dot_size arg to beeswarm #3216

Closed
wants to merge 1 commit into from

Conversation

noah-asing
Copy link

@noah-asing noah-asing commented Aug 24, 2023

Overview

Add argument for dot_size in beeswarm plot

Checklist

  • All pre-commit checks pass.
  • Unit tests added (if fixing a bug or adding a new feature)

@thatlittleboy
Copy link
Collaborator

Hi @noah-asing , thanks for the interest in contributing to shap! Can you elaborate a little more about your use case (e.g. why is a fixed dot size of 16 not sufficient for you)? If possible, please also provide images of the current beeswarm that you are getting so we can also understand the issue at hand.

With plotting wrappers (like our shap.plots.xxx functions), I understand that there will always be customizations that users will require, but on our end I also wish to control the number of arguments that we expose. Or at least ensure that each new one we add in has a use-case that is well-documented (e.g. as an issue or in PRs like these).

@thatlittleboy thatlittleboy added awaiting feedback Indicates that further information is required from the issue creator enhancement Indicates new feature requests labels Aug 26, 2023
@noah-asing
Copy link
Author

Hi @thatlittleboy, there isn't a specific "need" per se, more of a "nice to have".

I thought it might be nice to have more definition in the beeswarm to try to visually separate NaN clusters, high-feature-value clusters and low-feature-value clusters. Reducing the alpha value resulted in the NaN clusters essentially disappearing completely underneath purple blobs, and I was hoping reducing the dot size might do the trick.

I saw that the scatter plots had a dot_size arg, so I didn't think there'd be a reason not to add dot_size to the beeswarm.

I didn't really think about controlling exposed arguments, so as of now this PR isn't really necessary (feel free to close).

@thatlittleboy
Copy link
Collaborator

@noah-asing

I thought it might be nice to have more definition in the beeswarm to try to visually separate NaN clusters, high-feature-value clusters and low-feature-value clusters. Reducing the alpha value resulted in the NaN clusters essentially disappearing completely underneath purple blobs and I was hoping reducing the dot size might do the trick.

Did it make it better?


I'm definitely open to adding the customization option, I'll leave this up for a while longer, if anyone else is interested in this functionality feel free to state your use case!

Thanks for the contribution in any case! :)

@connortann connortann added the visualization Relating to plotting label Dec 4, 2023
@connortann
Copy link
Collaborator

I shall close this for now as we are thinking of implementing style customisation in a different manner: #3377

However, thank you for the PR in any case, as it's helpful to understand what features you need! We'll aim to get a proper customisation API implemented, and any and all contributions are highly appreciated.

@connortann connortann closed this Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback Indicates that further information is required from the issue creator enhancement Indicates new feature requests visualization Relating to plotting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants