psf / pyperf

Toolkit to run Python benchmarks
http://pyperf.readthedocs.io/
MIT License
817 stars 79 forks source link

Kernel density estimation instead of histogram #13

Open mithrandi opened 8 years ago

mithrandi commented 8 years ago

I think it would be nice to include this as a complement to the existing histogram out of the box, as a KDE sidesteps the issues with selecting a correct bucket size for the histogram. I'm not really a stats person so I can't explain this very well, but Wikipedia has more info and you can see an example of this in use in the "criterion" benchmarking tool for Haskell: http://www.serpentine.com/criterion/fibber.html

vstinner commented 5 years ago

Is there someone interested to implement this idea?

vstinner commented 8 months ago

Update: Python 3.13 now has a statistics.kde() function: https://docs.python.org/dev/library/statistics.html#statistics.kde

Anyway, you can write your own script to plot data, example: https://pyperf.readthedocs.io/en/latest/examples.html#hist-scipy-script

If someone writes an example using KDE, I can include it in the doc ;-)