5.2 Kernel Ridge Regression
Ridge regression in a feature space, without building the features.
These notes walk through the lecture slides. The original deck is unchanged; use (slides) on the course hub if you want that PDF.
The figures follow Deisenroth, Faisal, and Ong, Mathematics for Machine Learning, Theodoridis, and Géron, Hands-On Machine Learning.
1. Kernel ridge regression
Regularized empirical risk in an RKHS is
The regularizer is typically the squared RKHS norm .
2. Matrix notation
- : targets.
- : design matrix of inputs.
- : kernel matrix.
The regularizer becomes , where holds the coefficients in the RKHS expansion of .
3. Gradient
The finite-dimensional problem is
Differentiate and set to zero:
4. Solving for
so
and
When can be cancelled, the usual kernel-ridge form is
5. Predictions
With that ,
The linear algebra is the same as ridge, but every inner product among features has been replaced by a kernel evaluation. The penalty still controls complexity and overfitting.
6. Practice
-
What does the kernel trick avoid computing?
-
Write the usual closed-form for kernel ridge in terms of , , and .
-
Once you have , how do you form the vector of training predictions?