Skip to main content

Timeline for cv.glmnet vs glmnet

Current License: CC BY-SA 4.0

3 events
when toggle format what by license comment
Sep 20, 2022 at 14:32 comment added C C Thanks for the reply! However changing the s parameter doesn't seem to resolve the issue When i manually fit a ridge regression model using the minimum lambda value : ridge.fit <- glmnet(model.matrix(Apps~.,College), College$Apps, alpha=0, lambda=cv.ridge$lambda.min) Then predict on the data : pred.out <- predict(ridge.fit, model.matrix(Apps~.,College)) the test MSE is 1359837 which differs from the cv.glmnet way. In the predict call for the ridge model I have also tried specifying the s parameter to lambda.min as well but it has no effect on the result.
Sep 20, 2022 at 12:02 history edited cdalitz CC BY-SA 4.0
added 93 characters in body
Sep 20, 2022 at 11:57 history answered cdalitz CC BY-SA 4.0