Builds penalty matrix combining smoothing spline and ridge penalties with optional predictor/partition-specific components. Handles custom penalties and scaling.
compute_Lambda(
custom_penalty_mat,
L1,
wiggle_penalty,
flat_ridge_penalty,
K,
nc,
unique_penalty_per_predictor,
unique_penalty_per_partition,
penalty_vec,
colnm_expansions,
just_Lambda = TRUE
)
List containing:
Lambda - Combined \(nc \times nc\) penalty matrix (\(\boldsymbol{\Lambda}\))
L1 - Smoothing spline penalty matrix (\(\textbf{L}_1\))
L2 - Ridge penalty matrix (\(\textbf{L}_2\))
L_predictor_list - List of predictor-specific penalty matrices (\(\textbf{L}_\text{predictor\_list}\))
L_partition_list - List of partition-specific penalty matrices (\(\textbf{L}_\text{partition\_list}\))
If just_Lambda=TRUE
and no partition penalties, returns only Lambda matrix \(\boldsymbol{\Lambda}\).
Matrix; optional custom ridge penalty structure
Matrix; integrated squared second derivative penalty (\(\textbf{L}_1\))
Numeric; smoothing and ridge penalty parameters
Integer; number of interior knots (\(K\))
Integer; number of basis columns per partition
Logical; enable predictor/partition-specific penalties
Named numeric; custom penalty values for predictors/partitions
Character; column names for linking penalties to predictors
Logical; return only combined penalty matrix (\(\boldsymbol{\Lambda}\))