What parameterization to glmnet
will give the same results as glm
? (I'm mainly interested in logistic and linear regressions, if that matters.)
Contents
hide
Best Answer
You will get the same results as glm
when you pass alpha=1
(the default) and lambda=0
. especially that last one: it means no penalization.
Note that the method of fitting is different in both, so although theoretically you should get the same result, there may still be tiny differences depending on your data.
Similar Posts:
- Solved – How to make glmnet give the same results as glm
- Solved – How to make glmnet give the same results as glm
- Solved – Why does lambda.min value in glmnet tuning cross-validation change, when repeating test
- Solved – Why does lambda.min value in glmnet tuning cross-validation change, when repeating test
- Solved – Why does lambda.min value in glmnet tuning cross-validation change, when repeating test