[SciPy-User] Question about gaussian_kde
Mon Apr 12 12:48:01 CDT 2010
On Mon, Apr 12, 2010 at 11:00, Jorge Scandaliaris
> I am using gaussian_kde mainly to visualize the distribution of some 2D
> measurements. It works ok but there's something I don't understand. When I
> evaluate the estimated pdf, the peaks have values larger than one. If I use
> integrate_box(), however, the results seem correct. How should I normalize the
> values obtained from evaluate? Dividing by the number of datapoints?
The values are correct. Remember that this is a probability *density*.
All that means is that the integral over the domain is equal to 1. The
value at any point is not a probability itself; it just needs to be
non-negative. For example:
In : from scipy import stats
In : stats.norm.pdf(0.0, scale=0.01)
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the SciPy-User