# Kernelized Ridge Regression implementation crashing

I am trying to implement kernelized ridge regression. There are 20000 data rows approximately and about 150 features.

This is the model being fit:

KernelRidge(alpha, kernelType, gamma=0.005, degree=3, coef0, kernel_params=None)


where kerneltype has been set to 'rbf' and 'linear', both times slowing down and eventually eating up a lot of memory

I dont think degree is causing the problem. I tried the same thing with degree=1 as well.

I also tried the same thing with gamma = 1 but faced the same issue.

Regular ridge, lasso and linear regression take not more than a second to complete (for the same data).

Where could I be going wrong?