| .fit_coefficients | R Documentation |
Dispatches to blockfit_solve when the blockfit conditions are met
(i.e. env$use_blockfit is TRUE), otherwise calls get_B.
On blockfit_solve failure, falls back to get_B automatically.
.fit_coefficients(G_list, Lambda, L_partition_list, env, return_G_getB, ...)
G_list |
List; eigendecomposition results from |
Lambda |
Matrix; current combined penalty matrix. |
L_partition_list |
List; partition-specific penalty matrices. |
env |
List; tuning environment from |
return_G_getB |
Logical; whether to return G inside the fit. Set to
TRUE within |
... |
Additional arguments forwarded to the fitting routine. |
The blockfit condition mirrors lgspline.fit:
blockfit && length(flat_cols) > 0 && K > 0, pre-computed in
tune_Lambda and stored in env$use_blockfit.
return_G_getB is set to TRUE by the callers so that
B_list$G_list contains the updated G matrices (after any GLM
weight iteration inside get_B or blockfit_solve).
These are needed immediately after this call for AGAmult_wrapper
and the trace computation.
When correlation structure inputs are supplied, this wrapper does not
introduce a separate tuning-specific notation or solver path. Instead, the
same correlated coefficient estimator used in the final model fit is called
here inside each tuning-objective evaluation. In particular, any
structured-correlation Woodbury factorization
\mathbf{G}^{-1} =
\mathbf{G}_{\mathrm{on}}^{-1} + \mathbf{G}_{\mathrm{off}}^{-1}
is handled inside get_B and documented in lgspline-details.
List; output of blockfit_solve or get_B, containing
at minimum $B (coefficient list) and $G_list.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.