question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nomalization factor in kdeplot

See original GitHub issue

I know this feature has been suggested before as part of #479. My use case is however a bit different.

I suggest to put a normalization factor in the kdeplot function. When looking at a subset of data, I would like to scale the KDE to normalize to the fraction of included data. Now you get something like the figure below, where blue is the total data set and green/orange are two subsets of my data. If we could include a normalization parameter, we can match the KDE’s of the subsets to the KDE of the total set.

kde_problem

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
mwaskomcommented, Apr 5, 2018

This is actually a duplicate of a very old issue: #61

1reaction
Dimchordcommented, Apr 5, 2018

No, it is an entirely different issue. That issue is about setting the Axis limits.

Read more comments on GitHub >

github_iconTop Results From Across the Web

seaborn.kdeplot — seaborn 0.12.1 documentation - PyData |
The curve is normalized so that the integral over all possible values is 1, meaning that the scale of the density axis depends...
Read more >
Seaborn probability histplot - KDE normalization
But there is a factor that is applied on the sample values based on what representation of the data you are interested in....
Read more >
Python: "Normalizing" kde, so it always lines up with histogram
The lines statement overlays the default kernel density estimator (KDE) of the density procedure onto the histogram. One can change the ...
Read more >
scipy.stats.gaussian_kde — SciPy v1.9.3 Manual
The method used to calculate the estimator bandwidth. This can be 'scott', 'silverman', a scalar constant or a callable. If a scalar, this...
Read more >
Kernel density estimation - Wikipedia
In statistics, kernel density estimation (KDE) is the application of kernel smoothing for probability density estimation, i.e., a non-parametric method to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found