What is a kernel density estimate (Parzen window estimate), and what does the bandwidth h control? Why is the method called non-parametric?

Supervised learning, Parzen windows and kernel density estimation
Level L1 Beginner. Length Short. Nature Th Theoretical.

What's being asked

Whether you understand KDE as a sum of small bumps and know the effect of the bandwidth.

Key idea

f^(x)=1nh∑i=1nK ⁣(x−xih): one bump of width h at each data point, averaged.

Steps

  1. Put a small bump (the kernel K, such as a Gaussian or a box) on each of the n data points xi. Add the bumps and divide so that the total area is 1. This gives f^(x)=1nh∑iK ⁣(x−xih).
  2. The bandwidth h is the width of each bump. A small h gives a spiky curve with a peak at every point (overfitting, high variance).
  3. A large h gives a very smooth curve that hides real structure (underfitting, high bias). A good h is found by cross-validation or a rule of thumb.
  4. The choice of kernel matters much less than the choice of h.
  5. It is non-parametric because there is no fixed set of parameters (such as a mean and a variance) to fit. The model is the whole data set, and its complexity grows with n.

Common mistakes

How long your answer should be

5 sentences.

Last checked on 4 December 2026.

Read this

Previous in Supervised learning: In k-nearest neighbours classification, what happens to the decision boundary when k=1 and when k=n (the training set size)? How does this show the bias–variance trade-off, and how would you choose k?
Next in Supervised learning: What is the perceptron learning rule for labels yi∈{−1,+1}, and how does one update move the prediction in the right direction?