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.
Since the estimate of bivariate kde allow matrix as input, e.g.,
it would be more convenient when evaluating at each points of x by
pdf(f, x)
thanBTW, 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.