SKLearn KernelRidge memory demand I am fitting a model with 100,000 samples x 10 features (6 ints and 4 floats), using SKLearn KernelRidge:

model = KernelRidge(kernel='linear')


Looking at the task manager, 'Python' process takes ~40GB.

Can you please explain why is there such a high demand?
What kind of matrix is built in the background?
This is rather common.  The algorithm for KernelRidge requires a SVD to be performed.  Sadly, the SVD cannot handle a sparse matrix so the _pre_compute_svd function in sklearn just converts the matrix into a dense matrix and moves on.  This tends to blow up memory rather quickly.

You have a couple of choices.  Rewrite the method to handle sparse matrices or just use a different method.  SVR would be the most similiar alternative.