This function calculates a lambda value based on the selected discrepancy method for a generalized linear model (GLM). The discrepancy method determines the type of error or deviance used in the calculation.
get_glm_lambda(
discrepancy_method = c("mean_square_error", "mean_classification_error",
"logistic_deviance"),
X,
coefs
)Numeric. The computed lambda value based on the selected discrepancy method.
Character. A string specifying the type of discrepancy method
to use. Options are "mean_square_error", "mean_classification_error", or "logistic_deviance".
Default is "mean_square_error".
Matrix. The design matrix (predictors) for the GLM.
Numeric vector. The coefficients for the GLM.