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

More control over bins in plot_marginal() #181

Open
mayer79 opened this issue Oct 21, 2024 · 1 comment
Open

More control over bins in plot_marginal() #181

mayer79 opened this issue Oct 21, 2024 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@mayer79
Copy link
Collaborator

mayer79 commented Oct 21, 2024

Currently, the binning of plot_marginal() is controlled by two parameters:

  • n_bins: int = 10 and
  • bin_method: str = "uniform".

Ideally, the user could also pass user-defined bins, or a string referring to a typical method to calculate the number of bins ("scott", "sturges", "fd"), just like the bins parameter of np.histogram():

image

We could rename n_bins to bins. If bin_method = "uniform", we call np.histogram(x, bins=bins). If bin_method = "quantile", bins would need to be an integer.

@mayer79 mayer79 added the enhancement New feature or request label Oct 21, 2024
@lorentzenchr lorentzenchr changed the title [ENH] More control over bins in plot_marginal() More control over bins in plot_marginal() Nov 8, 2024
@lorentzenchr
Copy link
Owner

+1 for this feature. I'm happy to review.
Implementation should be fairly easy by using numpy.histogram_bin_edges inside bin_feature in binning.py.

@lorentzenchr lorentzenchr added the help wanted Extra attention is needed label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants