Random features
Companion to Lecture 3, Sections 6–8. \(f(x) = \sum_{j=1}^{F} \theta_j\, \phi_j(x)\), with \(F\) random features \(\phi_j\), frozen. Only \(\theta\) is fitted (ridge), so \(f\) is linear in \(\theta\).
Each feature is a ReLU kink \(\sigma(w_j(x - c_j))\), at \(c_j \sim U[-1, 1]\) with slope \(w_j \sim \mathcal{N}(0, 1)\). Training and test inputs also lie in \([-1, 1]\). The model is nonlinear in \(x\) but linear in \(\theta\): ridge regression on the features.
More features, better fit, up to a limit reached with a few hundred features.
Advanced, fine to skip: for every \(F\) this is already a kernel method (Section 7), with the random kernel \(K_F(x, x') = \frac{1}{F}\sum_j \phi_j(x)\,\phi_j(x')\). As \(F \to \infty\) it converges to a fixed kernel, \(K(x, x') = \mathbb{E}_{w,c}[\phi(x)\,\phi(x')]\) (dashed line): the randomness of the features averages out. On \([-1, 1]\) every feature is bounded by \(2|w_j|\), so the average over features converges.
Try: \(F\) from 1 to 1000. Then look at the impact of \(\lambda\).
Rahimi & Recht, NeurIPS 2007