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

Improve plot_feat method (AKA move to latest Seaborn once released) #69

Open
GilesStrong opened this issue Jun 8, 2020 · 0 comments
Open
Labels
improvement Something which would improve current status, but not add anything new medium priority Not urgent but should be dealt with sooner rather than later wait Something that relies on something else occurring first

Comments

@GilesStrong
Copy link
Owner

Current status

The plot_feat method provides 1D distributions for features in the form of histograms and KDEs, and also computes the mean and standard deviations of the distributions and their uncertainties.

Problems

  • Whilst the method accepts a weight argument, in order to plot weighted KDEs the data is sampled with replacement according to probabilities given by the (normalised weights).
    • This is a bit of a hack. The next release of Seaborn should include the ability to plot weighted KDEs (PR), so the resampling will no longer be necessary
    • This resampling method also means that all the data must have non-negative weights, which is not always the case in HEP.

Solution

Once latest version of Seaborn is released update plot_feat to use weighted KDEs. This will require:

  1. Depreciate some arguments related to data resampling
  2. Changes to the moments computation code to handle weighted data (they're currently computed on the resampled data, and so do not perform weighted computations)
  3. Update of plot_kdes_from_bs to use lineplot, since tsplot was removed in Seaborn V10
@GilesStrong GilesStrong added improvement Something which would improve current status, but not add anything new medium priority Not urgent but should be dealt with sooner rather than later wait Something that relies on something else occurring first labels Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something which would improve current status, but not add anything new medium priority Not urgent but should be dealt with sooner rather than later wait Something that relies on something else occurring first
Projects
None yet
Development

No branches or pull requests

1 participant