CV ridge regression plot


Any ideas why the plot for the ridge regression isn't working correctly. If i plot this using the code below the first dotted line should show the optimal value for lambda. The graph doesn't seem to reflect the min value(optimal value) Any ideas?

x1 and y2 are matrix

ridge_cv_fit = cv.glmnet(x2, y2, alpha=0, standardize=FALSE, lambda=grid)


(lambda_ridge_min = ridge_cv_fit$lambda.min)

Since we cannot see your plot, it is difficult to say what is going on. If you cannot upload a Reproducible Example, as explained in the link below, can you at least post an image of the plot?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.