Seite 1 von 1

Missing volume in kde_density solution

Verfasst: 3. Jun 2010 16:02
von Alexis1987
Hey,
maybe it's just me, but im missing the Volume in the solution for Assignment 2 Problem 2 Task A: kde_density.m.

The slides define a Kernel Density Estimation as:
\(p(x) = \frac{1}{Nh^d}\sum\limits_{n=0}^N{k\left(\frac{||x-x_n||}{h}\right)}\)

the distance matrix is the norm \(\frac{||x-x_n||}{h}\) from the formular
normpdf is the used Kernel function which is nothing else but \(k(x) = \frac{1}{\sqrt{2\pi}}\exp{\left(-\frac{x^2}{2}\right)}\).
\(\frac{\sum\limits_{n=0}^N}{N}\) is just the mean.
So we get \(p(x)= \frac{mean(normpdf(distance))}{h^d}\) but the solution only computes \(p(x)= mean(normpdf(distance))\)

I am Missing the the volume \(V = h^d\).

I know this doesn't matter for classification as long as each estimator uses the same bandwidth, but the density estimations themselves are incorrect.
And if I only want to classify with an estimation above a certain threshold my calssifier wouldn't work like it should.

If the volume isn't missing, but i'm missing something i would love to be corrected.

Alexis.

Re: Missing volume in kde_density solution

Verfasst: 3. Jun 2010 22:17
von cdn
I already wrote an email to Qi about these lines of code of the solution yesterday and he confirmed that there is indeed an error. He told me, that he will have a closer look at it and then give out a correct version.