Using glmnet, different metrics can be used to find the optimal value for log lambda, using cross-validation. For example, the maximum ROC-AUC for classification, or the minimum misclassification error rate.
Let's assume our glmnet model has a binary response (e.g., disease, yes vs. no).
Different steps in glmnet: (1) Define coefficient path for model predictors as function of log lambda. (2) X-fold cross-validation to find optimal log lambda that corresponds with lowest cross-validation misclassification error rate. (3) Apply log lambda that corresponds with lowest cross-validation misclassification error rate to find coefficients for markers in the glmnet model.
The misclassification error rate is a simple metric based on a confusion matrix. But, it requires a dichotomous variable (predicted disease, yes vs. no), not a continuous variable. So, in the glmnet algorithm, how exactely are the predicted classes defined?