| .compute_gcvu_gradient | R Documentation |
Computes the gradient of the modified GCV_u criterion with respect to the log-scale penalty parameters using analytical derivatives of the hat matrix trace and residual sum of squares.
.compute_gcvu_gradient(par, log_penalty_vec, outlist = NULL, env, ...)
par |
Numeric vector; log-scale penalty parameters. |
log_penalty_vec |
Numeric vector; log-scale predictor/partition penalties. |
outlist |
List or NULL; pre-computed GCV_u components from
|
env |
List; pre-computed objects and tuning configuration (same
structure as in |
... |
Additional arguments passed to fitting functions. |
The gradient is computed via:
\frac{\partial \mathrm{GCV}_u}{\partial \theta}
= \frac{1}{D^{2}} \left(
\frac{\partial N}{\partial \theta} D
- N \frac{\partial D}{\partial \theta}
\right)
where N = \sum r_{i}^{2} (numerator),
D = n(1 - \gamma\bar{W})^{2} (denominator), \theta is the
log-scale penalty parameter, and the chain rule
d\lambda / d\theta = \lambda (exp parameterization) is applied.
After differentiating through \mathbf{G}, \mathbf{U}, and the
trace term once, the gradient is stored as
\mathbf{M}_k = \partial \mathrm{GCV}_u /
\partial \boldsymbol{\Lambda}_k. Each log-penalty derivative is then
\sum_k \mathrm{tr}(\mathbf{M}_k\mathbf{L}_{j,k}).
List containing:
Numeric; GCV_u criterion value including meta-penalty.
Numeric vector; gradient on the log penalty scale.
List; GCV_u components (for reuse to avoid recomputation).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.