Menu

#384 Smooth histograms using kernel density estimation

closed
nobody
None
5
2008-06-26
2008-05-23
No

This patch draws a smooth histogram-like curve
for a random collection of points, using
a Gaussian kernel density estimation algorithm.

Demos are found here (for the time being):
www.philipp-janert.com/kdensity

The new method has the following advantages
over the classic way of generating histograms
using "smooth frequency":
- the resulting histogram is a smooth curve,
making the effect of binning less severe.
- it handles intermediate "bins" with no points
in them gracefully. (smooth freq does so
only if used "with boxes", but if you use
"with lines" for example, the line will not
drop to zero if an intermediate bin is
empty)

The method is invoked like a weighted smoothing
algorithm:
plot "data" u 1:(1):(1) smooth kdensity
where the 2nd parameter is the weight of each
point and the 3rd parameter is the bandwidth
to be used.

This patch complements the "smooth cumulative"
algorithm as another way to visualize the
distribution of a collection of random points.

Discussion

  • Philipp K. Janert

     
  • Philipp K. Janert

    • status: open --> closed
     
  • Philipp K. Janert

    Logged In: YES
    user_id=1930341
    Originator: YES

    Applied and closed. 26 Jun 08.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.