AID202 · Foundations of Machine Learning

Week 02 Interactive Labs

Five interactive concept pages built directly around this week’s slides. Each page now contains several example regimes so the same idea can be tested under different data conditions.

AID202 · Fall 2026Interactive classroom activity
Lecture 3 · 12-15 min

1. Kernel Regression Playground

Compare 1-NN, k-NN, and kernel regression on a smooth signal, an abrupt step, and a sparse region with an outlier. Discuss locality, smoothing bias, and sensitivity.

Open activity
Lecture 3 · 10-12 min

2. Distance Metrics Lab

Use an abstract feature space, a restaurant example from the slides, and a feature-unit trap. Change L1/L2/L∞ and feature weights, then watch the neighbor ranking change.

Open activity
Lecture 3 · 10 min

3. Curse of Dimensionality

Jump among 2-D, 10-D, 30-D, and 100-D regimes. Explore neighborhood volume, sample demand for k local neighbors, and concentration of distances.

Open activity
Lecture 4 · 12-15 min

4. Gradient Descent Lab

Fit lines for well-spread data, a flat-direction case, and an outlier case. Compare batch and stochastic updates, learning rates, and the closed-form optimum.

Open activity
Lecture 4 · 15 min

5. Generalization and Regularization

Try sine, cubic, and linear targets. Vary polynomial degree, training-set size, and regularization while watching train/test RMSE and coefficient growth.

Open activity