For my current reseach I'm using the Lasso method via the glmnet package in R on a binomial dependent variable.
In glmnet the optimal lambda is found via cross-validation and the resulting models can be compared with various measures, e.g. misclassification error or deviance.
My question: How exactly is deviance defined in glmnet? How is it calculated?
(In the corresponding paper "Regularization Paths for Generalized Linear Models via Coordinate Descent" by Friedman et al. I only find this comment on the deviance used in cv.glmnet: "mean deviance (minus twice the log-likelihood on the left-out data)" (p. 17)).