Kernel ridge regression uses the kernel on one-dimensional inputs, with penalty . The training data are and . Find the dual coefficients and predict at . Why is the dual form useful?
Supervised learning, Kernel ridge regression
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.
What's being asked
Whether you can derive the kernel ridge solution and use it for a prediction without ever writing the feature map.
Key idea
By the representer theorem, , and minimising gives .
Steps
- Write the model as . Here is the matrix with entries . The objective is .
- Set the gradient to zero: . So , and the solution satisfies it.
- Build the Gram matrix. , , . So and .
- The determinant is , so .
- Multiply by : .
- For the kernel values are and . So .
- The dual form is useful because we only need kernel values, not the feature map. With this kernel the features are ; with an RBF kernel they are infinite-dimensional. The cost is solving an system, about .
Common mistakes
- Forgetting and solving . That interpolates the data exactly and gives no regularisation.
- Using with the wrong inverse, for example inverting entry by entry instead of using the formula.
- Predicting with or with at the training points instead of the kernel between the new point and each training point.
How long your answer should be
Half a page; about 5 minutes.
Last checked on 4 December 2026.
Read this
Previous in Supervised learning: Prove that information gain from any split is non-negative, and say when it is exactly zero. Can it be zero for a split that is useful?
Next in Supervised learning: Locally weighted linear regression predicts at a query by minimising with weights . For the data , bandwidth and query , compute the prediction. How does it compare with the ordinary least-squares prediction at ?