Integrate 2D kernel density estimate
问题 I have a x,y distribution of points for which I obtain the KDE through scipy.stats.gaussian_kde. This is my code and how the output looks (the x,y data can be obtained from here): import numpy as np from scipy import stats # Obtain data from file. data = np.loadtxt('data.dat', unpack=True) m1, m2 = data[0], data[1] xmin, xmax = min(m1), max(m1) ymin, ymax = min(m2), max(m2) # Perform a kernel density estimate (KDE) on the data x, y = np.mgrid[xmin:xmax:100j, ymin:ymax:100j] positions = np