Revision as of 13:08, 19 March 2008 by Guptam (Talk)

ECE662 Main Page

Class Lecture Notes


Example of a useful Parzen window function $ \in \mathbb{R}^n $


Figure 1 - Useful Parzen Window $ \in \mathbb{R}^n $


This function has zero mean, H variance, an n-dimensional density, and is not compactly supported.

You can use any $ \varphi $ such that:

1) $ \varphi(\vec{u})>0,\forall\vec{u} $

2) $ \int_{R^n}\varphi(\vec{u})d\vec{u}=1 $

Given i samples $ \vec{X}_1,\vec{X}_2,...,\vec{X}_i\in{R}^n $,

$ P_i(\vec{X}_0)=\frac{1}{i\cdot{V}_i}\displaystyle\sum_{l=1}^{i} \varphi(\frac{ \vec{X_l}-\vec{X_0} }{h_i} ) $, where $ h_i $ is a number that controls $ V_i $.

i.e. $ V_i=h_i^n $ since $ V_i=\int\varphi(\frac{\vec{u}}{h_i})d\vec{u} $

Letting $ \vec{v}=\frac{\vec{u}}{h_i} $ and $ d\vec{v}=\frac{1}{h_i^n}d\vec{u} $, we have:

$ tex: V_i=\int{h_i^n}\varphi(\vec{v})d\vec{v}=h_i^n\int_{R^n}\varphi(\vec{v})d\vec{v}=h_i^n $

$ p_1(\vec{X}_0)=\frac{1}{i\cdot{h_i^n}}\displaystyle\sum_{l=1}^{i}\varphi(\frac{\vec{X}_l-\vec{X}_0}{h_i}) $ For convergence (in mean square) we need $ i\cdot{V_i}\displaystyle\to\infty $ as $ i\to\infty $


i.e. $ i\cdot{h_i^n}\to\infty $ as $ i\to\infty $, and $ h_i\to{0} $ as $ i\to\infty $.


    • PLEASE HELP FIX THE MATLAB CODE !!!!** [Parzen Window Estimation example]


How to make a decision using Parzen window method of density estimation

-> Given samples $ {X_1}^j, {X_2}^j ,..., {X_{d_j}}^j $, for class $ w_j $, i=1,2...,c

Choose $ w_j $ such that $ P(w_j|\vec{x_0}) \geq P(w_i|\vec{x_0}) $, for all i=1,2,...,c

$ \Longleftrightarrow p(\vec{x_0}|w_j)P(w_j)\geq p(\vec{x_0}|w_i)P(w_i) \forall i $

$ \Longleftrightarrow p(\vec{x_0}, w_j) \geq p(\vec{x_0}, w_i) \forall i $

,where $ p(\vec{x_0},w_j) \simeq \frac{1}{total # of samples \mul x V} \sum_{l=1}^{d_j}\varphi(\frac{\vec{{x_l}^j}-\vec{x_0}}{h}) \geq \frac{1}{total # of samples x V} \sum_{l=1}^{d_i}\varphi(\frac{\vec{{x_l}^i}-\vec{x_0}}{h}) $

Therefore, $ \sum_{l=1}^{d_j}\varphi(\frac{\vec{x_l^j}-\vec{x_0}}{h}) \geq \sum_{l=1}^{d_i}\varphi(\frac{\vec{x_l^i}-\vec{x_0}}{h}) $

In the last equation, the first term represents $ K_j $ around $ x_0 $, and the second term represents $ K_i $ around $ x_0 $.

"Assign category of majority vote of neighbors", where total # of samples = $ \sum_{i=1}^{d}d_i $.

Alumni Liaison

Have a piece of advice for Purdue students? Share it through Rhea!

Alumni Liaison