83.4k views
4 votes
What's difference between glm and glmnet?

User Cory Shaw
by
6.2k points

1 Answer

4 votes
Glmnet is for elastic net regression. This penalises the size of estimated coefficients (via a mix of two ways). It tries to explain as much variance in the data through the model as possible while keeping the model coefficients small.

Glm doesn't use a penalty term.
User FrancescoMM
by
6.3k points