Whether and how twasWeightsPipeline stacks its
per-method weights into an SR-TWAS ensemble.
Usage
EnsembleParam(
enabled = FALSE,
r2Threshold = 0.01,
solver = c("quadprog", "glmnet"),
alpha = 1
)Arguments
- enabled
Logical. Compute SR-TWAS ensemble weights. Default
FALSE.- r2Threshold
Minimum cross-validated \(R^2\) for a method to enter the stack. Default
0.01. Stacking needs at least two methods to clear it.- solver
Stacking solver,
"quadprog"(default) or"glmnet".- alpha
Elastic-net mixing parameter, used only when
solver = "glmnet". Default1.
Value
A EnsembleParam object, a MethodParam.
Requires cross-validation
Stacking combines each method's out-of-fold predictions, so it
cannot run without cross-validation. enabled = TRUE together with
CrossValidationParam(folds < 2) is an error. It used to be
neither: the ensemble row was simply absent from the result, with
ensemble = TRUE still reading as on.
enabled defaults to FALSE because
CrossValidationParam defaults to no folds. To get an
ensemble, ask for both.