Difference between glmnet() and cv.glmnet() in R?

后端 未结 2 1939
野的像风
野的像风 2020-12-29 11:16

I\'m working on a project that would show the potential influence a group of events have on an outcome. I\'m using the glmnet() package, specifically using the Poisson featu

2条回答
  •  一个人的身影
    2020-12-29 12:08

    Between reg$lambda.min and reg$lambda.1se ; the lambda.min obviously will give you the lowest MSE, however, depending on how flexible you can be with the error, you may want to choose reg$lambda.1se, as this value would further shrink the number of predictors. You may also choose the mean of reg$lambda.min and reg$lambda.1se as your lambda value.

提交回复
热议问题