Missing volume in kde_density solution

Moderator: Statistisches Maschinelles Lernen

Alexis1987
Windoof-User
Windoof-User
Beiträge: 41
Registriert: 29. Apr 2007 16:58

Missing volume in kde_density solution

Beitrag 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.
Der Tofu-Burger schmeckt ausgezeichnet, wenn man ihn Kurz vor dem Verzehr durch ein saftiges T-Bone-Steak austauscht.

cdn
Mausschubser
Mausschubser
Beiträge: 55
Registriert: 13. Dez 2008 13:54

Re: Missing volume in kde_density solution

Beitrag 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.

Antworten

Zurück zu „Statistisches Maschinelles Lernen“