trex_gvs_lambda2_power_rule: The knee of the full lambda_2 profile of the T-Rex+GVS...

View source: R/trex_gvs_selector.R

trex_gvs_lambda2_power_ruleR Documentation

The knee of the full lambda_2 profile of the T-Rex+GVS selector

Description

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.

Usage

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
)

Arguments

X

Feature matrix (n x p) in memory, or an mmap_matrix, the handle of a memory-mapped file. Every probe normalizes it in place and hands it back, so X is unchanged on return and never copied. A memory-mapped design needs "readwrite" mode for that, and "readonly" mode suffices under scaling_mode = "NONE".

y

Response vector (length n).

tFDR

Target FDR level (default: 0.1).

gvs_control

A GVS control list from trex_gvs_control() (default: trex_gvs_control()); its lambda_2 is replaced per probe, everything else is shared by every probe.

control

A control list from trex_control(), or NULL (default), taken as by TRexGVSSelector: with NULL the base control of the C++ class applies, and a control that is passed has to name a solver of the track.

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 trex_default_lambda2_grid(): 0, 1, 3, 10, 30, 100, 300, 1000, 3000. Under scaling_mode = "ZSCORE" the probes run at these values times n - 1. The value 0 is the T-Rex with the lasso.

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: FALSE).

Value

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.

See Also

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()

Examples


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


TRexSelector documentation built on Nov. 20, 2026, 5:09 p.m.