[SciPy-user] scipy.stats.gaussian_kde for 2d kernel density estimation

massimo sandal massimo.sandal@unibo...
Wed Jul 23 05:58:00 CDT 2008


I can't figure out how to do bivariate kernel density estimation with 
the scipy.stats.gaussian_kde module .1D evaluation seems working, but 2D 
evaluation escapes me.

I have two vectors representing x and y coordinates of points:


The problem is: how do I build the grid to evaluate the points? I would 
expect that he wants an x range and a y range (something like 
xrange=numpy.arange(0,100,1) ) from which he builds and evaluates the 
grid. However this does not work, and I do not understand how to create 
a proper 2d-grid that has the correct coordinate information.

Where can I look for information? The built-in documentation seems a bit 
terse on this point.

Thanks a lot,

Massimo Sandal , Ph.D.
University of Bologna
Department of Biochemistry "G.Moruzzi"

snail mail:
Via Irnerio 48, 40126 Bologna, Italy



tel: +39-051-2094388
fax: +39-051-2094387
-------------- next part --------------
A non-text attachment was scrubbed...
Name: massimo_sandal.vcf
Type: text/x-vcard
Size: 274 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/scipy-user/attachments/20080723/a9c2d299/attachment.vcf 

More information about the SciPy-user mailing list