0% found this document useful (0 votes)
13 views

Pattern Recognition - Tutorial 4

This document provides instructions for a pattern recognition tutorial assignment. It involves estimating densities from samples using the Parzen window method and comparing different kernel functions. It also asks questions about non-parametric classification methods like k-nearest neighbors and their computational complexities. The assignment must be submitted as a single PDF file by November 30th adhering to the submission rules.

Uploaded by

hawadov381
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Pattern Recognition - Tutorial 4

This document provides instructions for a pattern recognition tutorial assignment. It involves estimating densities from samples using the Parzen window method and comparing different kernel functions. It also asks questions about non-parametric classification methods like k-nearest neighbors and their computational complexities. The assignment must be submitted as a single PDF file by November 30th adhering to the submission rules.

Uploaded by

hawadov381
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Lehrstuhl für Angewandte Informatik III

Robotik und Eingebettete Systeme


Prof. Dr. Dominik Henrich

Pattern recognition – Tutorial 4


Submission: 30.11.23 14:00; Discussion: 04.12.23 10:00 S112
Please read and adhere to the submission rules provided in the e-learning course.
Hand in your solutions as a single *.pdf file.

1 Parzen window estimation


We want to estimate the density of a triangle distribution by utilizing the Parzen window estimation.
The triangle distribution is given by

2(x−a)

 (b−a)(c−a)

 a≤x≤c
2(b−x)
f (x) =
 (b−a)(b−c)
c<x≤b

0

else
Remarks for this task:
– The programming language is arbitrary.
– You may use external libraries or packages for this task.
– Do not print your source code on the *.pdf.
– Add all resulting plots on the *.pdf. Ensure that the labeling of the plots is useful.
a) Parameter-set: n = 200, a = 1.0, b = 8.0, c = 6.0, f rom = 0.0, to = 10.0, m = 1000, h = 0.6 and
k ∈ {exponential, epanechnikov}. (6)

i) Write a function to generate n ∈ N random samples based on the triangle distribution with
the parameters a, b, c ∈ R. Plot a histogram of the n samples with the given parameter set.
ii) Implement a function which estimates the density based on a set of n samples for a range given
by the parameters f rom ∈ R and to ∈ R on m ∈ N equidistant positions. The utilized kernel
is given by k ∈ {exponential, epanechnikov} with the window width h ∈ R. The function
shall return a set (e.g. a vector) of m estimated densities of the equidistant positions. Plot
(only) the implemented kernels first.
iii) Use the implemented functions to estimate the densities with the parameter set using both
kernels. Display the results and the underlying triangle density in one plot.
iv) How would you change the window width for the exponential kernel? Please explain your
decision.

b) Use your implementation to generate estimations using the parameter set in a) with the epanechnikov
kernel and five different reasonable values for h. Display the results and the underlying triangle den-
sity in one plot. How would you choose h in this example? Please explain your answer. (2)
c) Repeat Task a) with n = 10000. What do you observe? (1)
d) Repeat Task b) with n = 10000. What do you observe? What impact has n on h? (1)

Date: November 23, 2023 Page 1 of 2


File: C:\Users\hartwig\Desktop\pattern_recognition\04.non_parametric_classification\ue04.tex
Lehrstuhl für Angewandte Informatik III
Robotik und Eingebettete Systeme
Prof. Dr. Dominik Henrich

2 Non-parametric classification
a) In which cases would you use Parzen window estimation, K-nearest neighbor estimation or posterior
estimation? You can argue, for example, with the size of the training set, the computational effort,
the memory requirements or other useful factors. (3)

b) Name and explain the requirements for a valid Parzen window φ(u) (kernel). (1)

c) What is the worst-case error-rate if you choose k = n for a dataset D with n samples and c
categories when utilizing the k-Nearest-Neighbour classifier? Please explain your answer. (2)

d) Show that Pn (ωi |x) = kki (posterior estimation - see slide 4-18). Give an intuition of this formula
with your own words. (2)

e) What is the naive approach to determine the k-Nearest-Neighbour for one sample x considering a
dataset with n samples with dimensionality d? What is the computational complexity? How could
this approach be improved? (2)

Date: November 23, 2023 Page 2 of 2


File: C:\Users\hartwig\Desktop\pattern_recognition\04.non_parametric_classification\ue04.tex

You might also like