| .compute_meta_penalty | R Documentation |
Computes the regularization term that pulls predictor- and partition-specific penalty parameters toward 1 on the raw (positive) scale. This acts as a "meta-penalty" on the penalty magnitudes themselves.
.compute_meta_penalty(
wiggle_penalty,
penalty_vec,
meta_penalty_coef,
unique_penalty_per_predictor,
unique_penalty_per_partition
)
wiggle_penalty |
Numeric; current wiggle penalty on raw scale. |
penalty_vec |
Numeric vector; current predictor/partition penalties
on raw scale. May be empty ( |
meta_penalty_coef |
Numeric; coefficient for the meta-penalty. |
unique_penalty_per_predictor |
Logical; whether predictor-specific penalties are active. |
unique_penalty_per_partition |
Logical; whether partition-specific penalties are active. |
The penalty takes the form:
0.5 \times c_{\mathrm{meta}} \times \sum_{j} (\lambda_{j} - 1)^{2}
+ 0.5 \times 10^{-32} \times (\lambda_{w} - 1)^{2}
where \lambda_{j} are predictor/partition penalties and
\lambda_{w} is the wiggle penalty.
Numeric scalar; the regularization penalty value.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.