[SciPy-user] KDE question

Zachary Pincus zpincus@stanford....
Fri Nov 9 13:34:11 CST 2007

Hello all,

I'm using scipy.stats.gaussian_kde to estimate the a probability  
density based on some scattered 2D samples. What I would like to do  
eventually is plot a line that surrounds (say) 90% of the probability  

Clearly this line corresponds to some contour of the density function  
(which I can extract out easily enough from KDE density estimates on  
a grid), but I'm not sure how to figure out what exact contour value  
it is that I want.

Given the KDE density estimates on a grid, I could empirically figure  
out which value is closest, but I was wondering if there's a simpler  
closed-form solution... (And apologies if it's somehow obvious; I'm  
feeling a bit foggy-headed about this.)



More information about the SciPy-user mailing list