Line 41: Line 41:
 
a unit cube region <math>R</math> is created around <math>x_0</math>
 
a unit cube region <math>R</math> is created around <math>x_0</math>
  
using the following window function  to count the samples in <math>R</math>
+
using the following window function  to count the samples in <math>R</math>.
  
 
<math>\phi(x) = \rho(x_1,x_2,...,x_n) = \begin{cases}
 
<math>\phi(x) = \rho(x_1,x_2,...,x_n) = \begin{cases}
Line 48: Line 48:
 
\end{cases}</math>
 
\end{cases}</math>
  
[[Image:[[File:aalshai_fig1.jpg]]]]
+
Which yields the figure bellow.
 +
 
 +
[[Image:aalshai_fig1.png]]
 +
 
 +
As we can see in the figure above, the window is not centered the point. To fix that issue we simply shift the window to be centered at <math>x_0</math>. Doing that would allow us to count the training data around the mean <math>x_0</math>.
 +
 
 +
<math>\phi(x - x_0) = \begin{cases}
 +
1 \quad if  x \in R \\
 +
0 \quad else \\
 +
\end{cases}</math>
 +
 
 +
So the number of training points inside <math>R</math> is defined by:
 +
 
 +
<math>R = \sum_{l=1}^N \phi(x_l - x_0)</math>
 +
 
 +
<math> \Rightarrow \widehat{\rho}(x_0) = \frac{1}{N} \frac{\sum_{l=1}^N \phi(x_l - x_0)}{\int_{\Re^n} \phi(x)\, dx} </math>
 +
 
 +
<math> \Rightarrow \widehat{\rho_i}(x_0) = \frac{K_j}{j V_j} = \frac{1}{j V_j} \sum_{l=1}^j \phi(\frac{x_l - x_0}{h_j}) </math>
 +
 
 +
 
 +
<math>K_j = </math> The number of training points in <math>\{x_1,x_2,...,x_j\}</math> inside <math>R_j</math>
 +
 
 +
<math>R_j = </math> The region defined by <math>\phi(\frac{x_l - x_0}{h_j}) </math>
 +
 
 +
<math>V_j = </math> The volume of <math>R_j</math>
 +
 
 +
<math>V_j = \int_{\Re^n} \phi(\frac{x}{h_j})\, dx </math>
 +
 
 +
Thus leading to:
 +
 
 +
[[Image:aalshai_fig2.png]]
 +
 
 +
After shifting the window it is now centered at <math>x_0</math> and the <math>\rho_i(x_0)</math> would be the density estimate in that region for the class i. After applying the  <math>\rho_i(x_0)</math> function on all the classes, we choose the class with the highest number density for <math>x_0</math>.
 +
 
 +
We can think of
 +
 
 +
<math> /frac{1}[V_j} \phi(\frac{x_l - x_0}{h_j}) = \delta_j(x_j - x_0) \longrightarrow \delta(x - x_0)</math>
 +
 
 +
As an approximation of a unit impulse centered at <math>x_0</math>
 +
 
 +
<math>\delta(x) = \begin{cases}
 +
\infty \quad if  x = 0 \\
 +
0 \quad else \\
 +
\end{cases}</math>
 +
 
 +
<math>\int \delta(x)\, dx = 1</math>
 +
 
 +
So as <math> h_j \rightarrow 0 </math> it will look like:
 +
 
 +
[[Image:aalshai_fig3.png]]
 +
 
 +
So the smaller <math>h_j</math> get the lower the number of training point that fall inside the window.
 +
 
 +
----
 +
 
 +
 
 +
== The Parzen Windows Method in General ==
  
  

Revision as of 10:29, 30 April 2014


Parzen Windows

A slecture by ECE student Abdullah Alshaibani

Partly based on the ECE662 Spring 2014 lecture material of Prof. Mireille Boutin.



Post your slecture material here. Guidelines:

  • If you are making a text slecture
    • Type text using wikitext markup languages
    • Type all equations using latex code between <math> </math> tags.
    • You may include links to other Project Rhea pages.


Introduction

As a Local Density Estimation method, Parzen Windows, focuses on estimating the density in a small region and making a decision based on that specific region. The density estimation relies on the specific test point being classified and the region around it. The reasoning behind it is to not focus on the accuracy of density estimation, but on the accuracy of decision making.

The idea is to create a smaller region, with the test point at its center, within the full region of the training data, and estimate the density in that small region and classify that test point based on the class with the highest density.

The method relies on the type or shape of the window used to form the smaller region.


Parzen Windows Method with a Cube Window

As mentioned before the reasoning behind it is to accurately make decisions and classify data. Thus the ideal method to explain how it works is to start with the classification process.

Given a set of training data in a region $ \Re^n $, and a point $ x_0 $ in the region $ \Re^n $.

a unit cube region $ R $ is created around $ x_0 $

using the following window function to count the samples in $ R $.

$ \phi(x) = \rho(x_1,x_2,...,x_n) = \begin{cases} 1 \quad if \left\vert x_1 \right\vert < \frac{1}{2}, \left\vert x_2 \right\vert < \frac{1}{2},..., \left\vert x_n \right\vert < \frac{1}{2} \\ 0 \quad else \\ \end{cases} $

Which yields the figure bellow.

Aalshai fig1.png

As we can see in the figure above, the window is not centered the point. To fix that issue we simply shift the window to be centered at $ x_0 $. Doing that would allow us to count the training data around the mean $ x_0 $.

$ \phi(x - x_0) = \begin{cases} 1 \quad if x \in R \\ 0 \quad else \\ \end{cases} $

So the number of training points inside $ R $ is defined by:

$ R = \sum_{l=1}^N \phi(x_l - x_0) $

$ \Rightarrow \widehat{\rho}(x_0) = \frac{1}{N} \frac{\sum_{l=1}^N \phi(x_l - x_0)}{\int_{\Re^n} \phi(x)\, dx} $

$ \Rightarrow \widehat{\rho_i}(x_0) = \frac{K_j}{j V_j} = \frac{1}{j V_j} \sum_{l=1}^j \phi(\frac{x_l - x_0}{h_j}) $


$ K_j = $ The number of training points in $ \{x_1,x_2,...,x_j\} $ inside $ R_j $

$ R_j = $ The region defined by $ \phi(\frac{x_l - x_0}{h_j}) $

$ V_j = $ The volume of $ R_j $

$ V_j = \int_{\Re^n} \phi(\frac{x}{h_j})\, dx $

Thus leading to:

Aalshai fig2.png

After shifting the window it is now centered at $ x_0 $ and the $ \rho_i(x_0) $ would be the density estimate in that region for the class i. After applying the $ \rho_i(x_0) $ function on all the classes, we choose the class with the highest number density for $ x_0 $.

We can think of

$ /frac{1}[V_j} \phi(\frac{x_l - x_0}{h_j}) = \delta_j(x_j - x_0) \longrightarrow \delta(x - x_0) $

As an approximation of a unit impulse centered at $ x_0 $

$ \delta(x) = \begin{cases} \infty \quad if x = 0 \\ 0 \quad else \\ \end{cases} $

$ \int \delta(x)\, dx = 1 $

So as $ h_j \rightarrow 0 $ it will look like:

Aalshai fig3.png

So the smaller $ h_j $ get the lower the number of training point that fall inside the window.



The Parzen Windows Method in General




Questions and comments

If you have any questions, comments, etc. please post them on this page.


Back to ECE662, Spring 2014

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang