| .build_tuning_env | R Documentation |
Assembles a named list containing all pre-computed objects and configuration needed by the tuning-objective evaluation and gradient functions during penalty tuning. This avoids deep nesting of closures and makes the dependencies explicit.
.build_tuning_env(
y,
X,
X_gram,
Xy,
smoothing_spline_penalty,
A,
R_constraints,
K,
p_expansions,
N_obs,
custom_penalty_mat,
colnm_expansions,
unique_penalty_per_predictor,
unique_penalty_per_partition,
meta_penalty,
family,
delta,
order_list,
observation_weights,
homogenous_weights,
parallel,
parallel_eigen,
parallel_trace,
parallel_aga,
parallel_matmult,
parallel_qr = FALSE,
qr_pivot_smoothing_constraints = TRUE,
parallel_unconstrained,
cl,
chunk_size,
num_chunks,
rem_chunks,
unconstrained_fit_fxn,
keep_weighted_Lambda,
iterate,
qp_score_function,
quadprog,
qp_Amat,
qp_bvec,
qp_meq,
tol,
sd_y,
tuning_criterion,
gcv_gamma,
constraint_value_vectors,
glm_weight_function,
schur_correction_function,
need_dispersion_for_estimation,
dispersion_function,
blockfit,
just_linear_without_interactions,
Vhalf,
VhalfInv,
verbose,
include_warnings,
flat_cols,
use_blockfit
)
gcv_gamma |
Numeric scalar, at least 1; modified-GCV multiplier for the effective-degrees-of-freedom term. |
flat_cols |
Integer vector; pre-computed flat column indices (passed
in from |
use_blockfit |
Logical; pre-computed dispatch flag (passed in from
|
In addition to the standard tuning arguments, the environment stores two pre-computed blockfit dispatch items:
Logical; TRUE when blockfit is enabled,
flat_cols is non-empty, and K > 0. Mirrors the dispatch
logic in lgspline.fit so that the same fitting path is used
during tuning as during the final fit.
Integer vector; column indices of non-interactive linear
terms derived from just_linear_without_interactions and
colnm_expansions. Pre-computed once here rather than re-derived
at every tuning-objective evaluation.
Named list (the "tuning environment").
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.