This question already has an answer here:

I need to do a logistic regression that will likely have a lot of zeros. Can someone explain penalized logistic regression to me like I'm dumb?


marked as duplicate by Sycorax, Greenparker, John, gung regression Jun 4 '16 at 1:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


You add a penalty to control properties of the regression coefficients, beyond what the pure likelihood function (i.e. a measure of fit) does. So you optimizie

$$ Likelihood + Penalty $$

instead of just maximizing the likelihood.

The elastic net penalty penalizes both the absolute value of the coefficients (the “LASSO” penalty), which has advantage of performing automatic variable selection by shrinking irrelevant coefficients to zero, and the squared size of the coefficient (the “ridge” penalty), which has been shown to limit the impact of collinearity. The level of penalization is typically chosen by cross-validation. You can use the R package glmnet to fit elastic net penalized models.


Not the answer you're looking for? Browse other questions tagged or ask your own question.