KernelDensity.jl icon indicating copy to clipboard operation
KernelDensity.jl copied to clipboard

allow matrix as input for bivariate kde

Open szcf-weiya opened this issue 2 years ago • 0 comments

Since the estimate of bivariate kde allow matrix as input, e.g.,

x = randn(100, 2)
f = kde(x)

it would be more convenient when evaluating at each points of x by pdf(f, x) than

[pdf(f, x[i, 1], x[i,2]) for i = 1:size(x,1)]

BTW, at the first glance, I misunderstood the defined pdf(f, x, y), which evaluates at the grid formed by x and y instead of the pair of points. Sometimes, it would be also common to evaluate the pdf at some given points.

szcf-weiya avatar Jan 15 '22 04:01 szcf-weiya