Skip to content
Financial Machine Learning / Nonparametric and Tree-Based Methods

k-Nearest Neighbours and the Curse of Dimensionality

Every model so far — even the flexible splines and local regression of Topic 3 — has fitted a set of parameters and thrown the training data away once fitting is done. kk-nearest neighbours (KNN) does the opposite: it keeps the entire training set and, at prediction time, simply asks "what happened near here before?" This note develops that idea and its central limitation — the curse of dimensionality — which explains why a technique so intuitive in low dimensions can fail badly the moment a feature set grows, a genuine risk for any quant model with dozens of candidate factors.

In this lesson

  1. Learning objectives
  2. The KNN rule
  3. When parametric beats non-parametric
  4. The curse of dimensionality
  5. Worked example

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or browse the Financial Machine Learning syllabus.