get_glm_lambda: Compute Lambda Based on Discrepancy Method

get_glm_lambdaR Documentation

Compute Lambda Based on Discrepancy Method

Description

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.

Usage

get_glm_lambda(
  discrepancy_method = c("mean_square_error", "mean_classification_error",
    "logistic_deviance"),
  X,
  coefs
)

Arguments

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".

X

Matrix. The design matrix (predictors) for the GLM.

coefs

Numeric vector. The coefficients for the GLM.

Value

Numeric. The computed lambda value based on the selected discrepancy method.


catalytic documentation built on April 4, 2025, 5:51 a.m.