Kernel ridge regression fits a function as a weighted sum of kernel values at the training points. In the NTK view, this is the function a wide network ends up learning under gradient descent.
Implement kernel_ridge_predict(K_train, y, K_test, lam), which solves (K + lam I) alpha = y and predicts with K_test alpha.
np.linalg.solve, not an explicit inverse.Build K_train + lam * I, solve for the coefficients alpha, then multiply the test kernel by them.
No results yet
Run your code to check it against the examples, or submit to run every test.