I found that using as matrix resolve the issue:
yhat_test=predict(ridge_fit, newx=as.matrix(X), s=lambda_ridge_min)
head(yhat_test)
I found that using as matrix resolve the issue:
yhat_test=predict(ridge_fit, newx=as.matrix(X), s=lambda_ridge_min)
head(yhat_test)