Skip to content
Advertisement

Tag: k-fold

K-Fold cross validation for Lasso and Ridge models

I’m working with the Boston housing dataset from sklearn.datasets and have run ridge and lasso regressions on my data (post train/test split). I’m now trying to perform k-fold cross validation to find the optimal penalty parameters, and have written the code below. What can I do to resolve this issue and find the optimal penalty parameters using K-fold validation for

Advertisement