Skip to content

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

@GilesStrong

Description

@GilesStrong

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementSomething which would improve current status, but not add anything newmedium priorityNot urgent but should be dealt with sooner rather than laterwaitSomething that relies on something else occurring first

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions