View source: R/trex_gvs_selector.R
| trex_gvs_lambda2_power_rule | R Documentation |
Runs one FDR-controlled selection of
TRexGVSSelector per value of grid for
lambda_2, the ridge part of the elastic net or of the informed
elastic net, with the same seed, so the probes share their dummies and
differ by the penalty weight alone. The pick is the smallest lambda_2
whose selection is within knee_tolerance selections of the largest
(the knee of the profile). The result holds every probe's selection. The
pick depends on y and lies outside the fixed-lambda_2 FDR guarantee that
each probe carries. trex_tikhonov_lambda2_power_rule is the
same rule on the Tikhonov selector.
trex_gvs_lambda2_power_rule(
X,
y,
tFDR = 0.1,
gvs_control = trex_gvs_control(),
control = NULL,
seed = 0,
grid = trex_default_lambda2_grid(),
knee_tolerance = 1,
verbose = FALSE
)
X |
Feature matrix (n x p) in memory, or an |
y |
Response vector (length n). |
tFDR |
Target FDR level (default: 0.1). |
gvs_control |
A GVS control list from |
control |
A control list from |
seed |
Selector seed, the same for every probe (default: 0). A negative seed would draw fresh dummies per probe and is refused. |
grid |
lambda_2 candidates, stated for columns of unit norm, sorted
and de-duplicated. The default is
|
knee_tolerance |
Selections below the largest count that still count as "on the plateau" (default: 1); 0 reads the largest selection, ties toward the smallest lambda_2. |
verbose |
Whether the probes print their progress (default:
|
A list with the fields of
trex_tikhonov_lambda2_power_rule: lambda2 (the pick,
on the working scale: supplied as lambda_2 it reproduces the
selection), index (1-based, into grid), selected
(the 1-based selection at the pick), grid (the values the probes
ran at, ascending and de-duplicated), grid_scale (the factor
between the supplied grid and grid, n - 1 under
"ZSCORE" and 1 otherwise), counts (selection sizes per
grid value), probes (one list per grid value with
lambda2, selected, T_stop and seconds),
max_selected, n_ties, the boundary flags
at_lower_end and at_upper_end (the pick sits on the first
or on the last grid value, and a pick on the last one asks for a wider
grid) and seconds.
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_build_group_centering_k(),
trex_control(),
trex_da_control(),
trex_default_lambda2_grid(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
trex_gamma_to_k(),
trex_get_num_threads(),
trex_gvs_control(),
trex_normalize_design(),
trex_precision(),
trex_recall(),
trex_screen_control(),
trex_spca_control(),
trex_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
data(Gauss_data)
X <- Gauss_data$X
y <- Gauss_data$y
prof <- trex_gvs_lambda2_power_rule(X, y, tFDR = 0.1, seed = 1,
grid = c(0, 1, 10))
prof$lambda2
prof$counts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.