| Type: | Package |
| Title: | T-Rex Selector: High-Dimensional Variable Selection & FDR Control |
| Version: | 2.0.0 |
| Description: | Variable selection for regression and classification in high-dimensional settings with control of the false discovery rate (FDR) at a user-specified target level. The implementations are primarily based on the T-Rex selector of Machkour, Muma and Palomar (2025) <doi:10.1016/j.sigpro.2025.109894> and its dependency-aware extension for correlated variables by Machkour, Muma and Palomar (2025) <doi:10.1016/j.sigpro.2025.109990>. Since version 2.0.0 the package comes as R bindings to the 'TRexSelector' C++ library, which replaces the pure-R implementation of the 1.x releases. |
| URL: | https://github.com/trexselector/TRexSelector |
| BugReports: | https://github.com/trexselector/TRexSelector/issues |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| LazyData: | true |
| LinkingTo: | Rcpp, RcppEigen, BH, Rcereal |
| Depends: | R (≥ 4.3) |
| Imports: | Rcpp, R6, methods |
| Suggests: | Matrix, testthat (≥ 3.0.0), knitr, rmarkdown |
| VignetteBuilder: | knitr |
| SystemRequirements: | C++20 |
| Config/roxygen2/version: | 8.1.0 |
| NeedsCompilation: | yes |
| Packaged: | 2026-11-06 17:11:25 UTC; fabianscheidt |
| Author: | Jasin Machkour [aut, cre], Fabian Scheidt [aut], Simon Tien [ctb], Daniel P. Palomar [aut], Michael Muma [aut] |
| Maintainer: | Jasin Machkour <jasin.machkour@tu-darmstadt.de> |
| Repository: | CRAN |
| Date/Publication: | 2026-11-06 18:10:02 UTC |
TRexSelector: the T-Rex selector, its T-solvers and ML utilities
Description
FDR-controlled variable selection with the Terminating-Random Experiments (T-Rex) selector, the terminating solvers it runs on, and the machine learning utilities around them. The exported symbols form four groups, recognizable by their prefix (functions and constant lists) or their leading group word (R6 classes):
T-Rex selectors and controls (TRex*Selector, trex_*)
The R6 selectors TRexSelector, TRexDASelector, TRexGVSSelector, TRexScreeningSelector, TRexBiobankScreeningSelector, TRexSPCASelector and TRexTikhonovSelector; their control lists trex_control, trex_da_control, trex_gvs_control, trex_screen_control, trex_biobank_control, trex_spca_control, trex_tikhonov_control and trex_dummy_distribution; the helpers trex_normalize_design and trex_gamma_to_k; the evaluation metrics trex_fdp, trex_tpp, trex_precision, trex_recall, trex_fdp_dense and trex_tpp_dense.
T-solvers (T*_Solver, tsolver_*)
The terminating solvers as R6 classes, constructed as
$new(X, D, y, [groups | tikhonov_K,] options) with tsolver_options:
the LARS family (TLARS_Solver, TLASSO_Solver, TSTEPWISE_Solver,
TSTAGEWISE_Solver, TENET_Solver, TENETAug_Solver, TIENET_Solver,
TIENETAug_Solver, TIKNET_Solver), the OMP family (TOMP_Solver,
TGP_Solver, TACGP_Solver, TMP_Solver, TOOLS_Solver,
TNCGMP_Solver), the AFS solver TAFS_Solver, and the
coordinate-descent family (TCDLASSO_Solver, TCDENET_Solver,
TCDIENET_Solver, TCDTIKNET_Solver). The solvers work on the caller's
matrices without copying and may preprocess them in place; the
writer/reader contract and $restore() are described in tsolver_options
and TSolver_Base.
ML methods (ML*, ml_*)
Scalers MLZScoreScaler and MLLpNormScaler; regressions MLRidge, MLRidgeCV, MLElasticNet and MLElasticNetCV; decompositions MLSVD and MLPCA; hierarchical clustering ml_agglomerative_cluster and ml_cut_tree with the constants ml_linkage_method and ml_distance_metric.
Memory-mapped matrices (mem_*)
mem_matrix opens or creates a disk-backed matrix and mem_matrix_from writes an in-memory matrix to one; every selector, solver and ML method accepts the result in place of a matrix.
Author(s)
Maintainer: Jasin Machkour jasin.machkour@tu-darmstadt.de
Authors:
Jasin Machkour jasin.machkour@tu-darmstadt.de
Fabian Scheidt fabian.scheidt@tu-darmstadt.de
Daniel P. Palomar daniel.p.palomar@gmail.com
Michael Muma michael.muma@tu-darmstadt.de
Other contributors:
Simon Tien simon.tien@stud.tu-darmstadt.de [contributor]
See Also
Useful links:
Report bugs at https://github.com/trexselector/TRexSelector/issues
Toy data generated from a Gaussian linear model
Description
A data set containing a predictor matrix X with n = 50 observations and p = 100 variables (predictors), and a sparse parameter vector beta with associated support vector.
Usage
Gauss_data
Format
A list containing a matrix X and vectors y, beta, and support:
- X
Predictor matrix, n = 50, p = 100.
- y
Response vector.
- beta
Parameter vector.
- support
Support vector.
See Also
Other T-Rex selectors and controls:
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
# Generated as follows:
set.seed(789)
n <- 50
p <- 100
X <- matrix(stats::rnorm(n * p), nrow = n, ncol = p)
beta <- c(rep(5, times = 3), rep(0, times = 97))
support <- beta > 0
y <- X %*% beta + stats::rnorm(n)
Gauss_data <- list(
X = X,
y = y,
beta = beta,
support = support
)
Elastic Net (coordinate-descent path)
Description
Fits the elastic-net coefficient path via coordinate descent
over a glmnet-style lambda grid (or an explicit grid). Reports coefficients
in the original predictor scale, intercepts, the deviance-ratio path, and
predictions for new data. The mixing parameter alpha interpolates
between lasso (alpha = 1) and ridge (alpha = 0).
Methods
Public methods
MLElasticNet$new()
Initialize the MLElasticNet object.
Usage
MLElasticNet$new(low_memory = FALSE, n_threads = NULL)
Arguments
low_memoryLogical (default
FALSE).FALSE: the coordinate descent runs on a centered and standardized working copy of X (one n x p matrix while fitting).TRUE: it runs on X itself (anmmap_matrixis read in place,"readonly"suffices) with no allocation of the size of X; same estimator and grid, the two engines agree to rounding (about 1e-12 in the coefficients).n_threadsInteger, the thread budget of the fit's matrix products (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLElasticNet$fit()
Fit the EN path over an auto-generated glmnet-style grid.
Usage
MLElasticNet$fit( X, y, alpha = 1, n_lambda = 100, lambda_min_ratio = -1, standardize = TRUE, intercept = TRUE, use_strong_rule = FALSE, max_iter = 1e+05, tol = 1e-07 )
Arguments
XPredictor matrix (n x p), or an
mmap_matrix(bound zero-copy;"readonly"suffices, the fit does not modify X).yResponse vector (n).
alphaMixing in
[0, 1]: 1 = lasso, 0 = ridge (default 1).n_lambdaGrid size (default 100).
lambda_min_ratioRatio lambda_min/lambda_max; negative (default) auto-selects glmnet's rule.
standardizeStandardize columns to unit SD (default TRUE).
interceptFit an unpenalized intercept (default TRUE).
use_strong_ruleEnable the sequential strong rule (default FALSE).
max_iterMax CD sweeps per lambda (default 100000).
tolConvergence tolerance (default 1e-7).
Returns
Invisibly returns self.
MLElasticNet$fit_grid()
Fit the EN path at an explicit lambda grid (sorted descending internally); use to evaluate at exactly glmnet's sequence.
Usage
MLElasticNet$fit_grid( X, y, lambda_grid, alpha = 1, standardize = TRUE, intercept = TRUE, use_strong_rule = FALSE, max_iter = 1e+05, tol = 1e-07 )
Arguments
XPredictor matrix (n x p), or an
mmap_matrix(zero-copy).yResponse vector (n).
lambda_gridExplicit lambda values (any order, > 0).
alphaMixing in
[0, 1](default 1).standardizeStandardize columns to unit SD (default TRUE).
interceptFit an unpenalized intercept (default TRUE).
use_strong_ruleEnable the sequential strong rule (default FALSE).
max_iterMax CD sweeps per lambda (default 100000).
tolConvergence tolerance (default 1e-7).
Returns
Invisibly returns self.
MLElasticNet$get_coef()
Coefficient path in original predictor scale (p x n_lambda).
Usage
MLElasticNet$get_coef()
Returns
Numeric matrix.
MLElasticNet$get_intercepts()
Intercept per lambda (zero if intercept = FALSE).
Usage
MLElasticNet$get_intercepts()
Returns
Numeric vector.
MLElasticNet$get_lambdas()
Lambda grid actually used (descending).
Usage
MLElasticNet$get_lambdas()
Returns
Numeric vector.
MLElasticNet$get_dev_ratio()
Fraction of null deviance explained per lambda (glmnet %Dev).
Usage
MLElasticNet$get_dev_ratio()
Returns
Numeric vector.
MLElasticNet$converged()
Whether every lambda reached the convergence tolerance.
Usage
MLElasticNet$converged()
Returns
Logical scalar.
MLElasticNet$n_nonconverged()
Number of lambdas whose coordinate descent hit max_iter.
Usage
MLElasticNet$n_nonconverged()
Returns
Integer.
MLElasticNet$predict()
Predictions per lambda for new data.
Usage
MLElasticNet$predict(X_new)
Arguments
X_newPredictor matrix with the same number of columns as the fit, or an
mmap_matrix(zero-copy).
Returns
Numeric matrix (nrow(X_new) x n_lambda).
MLElasticNet$clone()
The objects of this class are cloneable with this method.
Usage
MLElasticNet$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
J. Friedman, T. Hastie, and R. Tibshirani, "Regularization Paths for Generalized Linear Models via Coordinate Descent," J. Stat. Softw., vol. 33, no. 1, pp. 1-22, 2010, doi: 10.18637/jss.v033.i01.
See Also
Other ML methods:
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
n <- 50; p <- 8
X <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + X[, 3] - X[, 5] + rnorm(n)
en <- MLElasticNet$new()
en$fit(X, y, alpha = 1.0)
dim(en$get_coef()) # p x n_lambda
en$predict(X[1:5, ])
Elastic Net with Cross-Validation
Description
Selects the elastic-net penalty by K-fold cross-validation over
a shared glmnet-style lambda grid (coordinate descent per fold), returning
lambda.min and lambda.1se. The mixing parameter alpha
interpolates between lasso (alpha = 1) and ridge (alpha = 0).
Methods
Public methods
MLElasticNetCV$new()
Initialize the MLElasticNetCV object.
Usage
MLElasticNetCV$new(low_memory = FALSE, n_threads = NULL)
Arguments
low_memoryLogical (default
FALSE);TRUEruns the full-data fit and every fold on X itself with a 0/1 training mask (no allocation of the size of X; anmmap_matrixis read in place). SeeMLElasticNet.n_threadsInteger, the thread budget of the matrix products of the fit and its folds (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLElasticNetCV$fit()
Fit K-fold CV over a glmnet-style grid.
Usage
MLElasticNetCV$fit( X, y, alpha = 0, n_folds = 10, n_lambda = 100, lambda_min_ratio = -1, seed = 0, standardize = TRUE, intercept = TRUE, max_iter = 1e+05, tol = 1e-07 )
Arguments
XPredictor matrix (n x p), or an
mmap_matrix(bound zero-copy;"readonly"suffices, the fit does not modify X).yResponse vector (n).
alphaMixing in
[0, 1]: 1 = lasso, 0 = ridge (default 0).n_foldsNumber of folds (default 10).
n_lambdaGrid size (default 100).
lambda_min_ratioRatio lambda_min/lambda_max; negative (default) auto-selects glmnet's rule.
seedFold-permutation RNG seed (default 0).
standardizeStandardize columns to unit SD (default TRUE).
interceptFit an unpenalized intercept (default TRUE).
max_iterMax CD sweeps per lambda (default 100000).
tolConvergence tolerance (default 1e-7).
Returns
Invisibly returns self.
MLElasticNetCV$cv_min()
Lambda that minimizes the mean CV error.
Usage
MLElasticNetCV$cv_min()
Returns
Scalar numeric.
MLElasticNetCV$cv_1se()
Largest lambda within one SE of the minimum (1SE rule).
Usage
MLElasticNetCV$cv_1se()
Returns
Scalar numeric.
MLElasticNetCV$index_min()
Index (1-based) of lambda.min.
Usage
MLElasticNetCV$index_min()
Returns
Integer.
MLElasticNetCV$index_1se()
Index (1-based) of lambda.1se.
Usage
MLElasticNetCV$index_1se()
Returns
Integer.
MLElasticNetCV$get_lambdas()
Lambda grid used (descending).
Usage
MLElasticNetCV$get_lambdas()
Returns
Numeric vector.
MLElasticNetCV$get_cv_errors()
Mean CV MSE per lambda.
Usage
MLElasticNetCV$get_cv_errors()
Returns
Numeric vector.
MLElasticNetCV$get_cv_std()
Standard error of the CV MSE per lambda.
Usage
MLElasticNetCV$get_cv_std()
Returns
Numeric vector.
MLElasticNetCV$clone()
The objects of this class are cloneable with this method.
Usage
MLElasticNetCV$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
J. Friedman, T. Hastie, and R. Tibshirani, "Regularization Paths for Generalized Linear Models via Coordinate Descent," J. Stat. Softw., vol. 33, no. 1, pp. 1-22, 2010, doi: 10.18637/jss.v033.i01.
R. Tibshirani, J. Bien, J. Friedman, T. Hastie, N. Simon, J. Taylor, and R. J. Tibshirani, "Strong Rules for Discarding Predictors in Lasso-Type Problems," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 74, no. 2, pp. 245-266, 2012, doi: 10.1111/j.1467-9868.2011.01004.x.
L. Breiman, J. H. Friedman, R. A. Olshen, and C. J. Stone, Classification and Regression Trees. Wadsworth, Belmont, CA, 1984.
See Also
Other ML methods:
MLElasticNet,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
n <- 60; p <- 10
X <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 - X[, 4] + rnorm(n)
cv <- MLElasticNetCV$new()
cv$fit(X, y, alpha = 0.5)
cv$cv_min()
Lp-Norm Scaler
Description
Scales input features to unit norm based on the chosen L1 or
L2 formulation. The center/scale arguments follow R's
scale(): the norm is computed around the applied
center (around 0 when center = FALSE).
Details
The *_inplace methods mutate X directly (zero-copy)
when it is a double-storage matrix; other inputs are coerced to a double
matrix first, in which case the coerced copy is modified. The (modified)
matrix is returned in both cases. X may also be an
mmap_matrix created by mem_matrix /
mem_matrix_from: the disk-backed buffer is then
bound zero-copy through the same Eigen map interface and modified in
place on disk. All scaler methods — including fit() — require the
handle to be open in "readwrite" mode, because the scaler core
binds a mutable map.
Methods
Public methods
MLLpNormScaler$new()
Initialize the MLLpNormScaler
Usage
MLLpNormScaler$new( norm_type = 2, center = TRUE, scale = TRUE, n_threads = NULL )
Arguments
norm_typeInteger, 1 for L1 norm, 2 for L2 norm (default: 2)
centerLogical, whether to center columns to mean 0 (default: TRUE)
scaleLogical, whether to scale columns to unit Lp norm (default: TRUE)
n_threadsInteger, the thread budget of the column passes (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLLpNormScaler$fit()
Compute the norm parameters.
Usage
MLLpNormScaler$fit(X, threshold = 1e-12)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode (the scaler core binds a mutable map).thresholdDouble, lower bound for the scale statistic (default: 1e-12).
Returns
Value.
MLLpNormScaler$transform_inplace()
Perform standardization in-place.
Usage
MLLpNormScaler$transform_inplace(X)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode.
Returns
The modified matrix X (the same handle for an mmap_matrix).
MLLpNormScaler$inverse_transform_inplace()
Inverse transform to original scale.
Usage
MLLpNormScaler$inverse_transform_inplace(X)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode.
Returns
The modified matrix X (the same handle for an mmap_matrix).
MLLpNormScaler$fit_transform_inplace()
Fit and transform in one call, like R's scale().
Usage
MLLpNormScaler$fit_transform_inplace(X, threshold = 1e-12)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode.thresholdDouble, lower bound for the scale statistic (default: 1e-12).
Returns
The modified matrix X (the same handle for an mmap_matrix).
MLLpNormScaler$is_fitted()
Check if scaler is fitted.
Usage
MLLpNormScaler$is_fitted()
Returns
Value.
MLLpNormScaler$get_dropped_indices()
Get dropped (degenerate) column indices. These columns get scale factor 1 and are still centered (sklearn semantics).
Usage
MLLpNormScaler$get_dropped_indices()
Returns
Value.
MLLpNormScaler$get_centers()
Get the learned centers (column means).
Usage
MLLpNormScaler$get_centers()
Returns
Value.
MLLpNormScaler$get_scales()
Get the learned scales.
Usage
MLLpNormScaler$get_scales()
Returns
Value.
MLLpNormScaler$get_center()
Check if scaler centers data.
Usage
MLLpNormScaler$get_center()
Returns
Value.
MLLpNormScaler$get_scale()
Check if scaler scales data to unit norm.
Usage
MLLpNormScaler$get_scale()
Returns
Value.
MLLpNormScaler$get_norm_type()
Get norm type (1 for L1, 2 for L2).
Usage
MLLpNormScaler$get_norm_type()
Returns
Value.
MLLpNormScaler$save()
Save model state to file.
Usage
MLLpNormScaler$save(filename)
Arguments
filenameString path to save output.
Returns
Value.
MLLpNormScaler$load()
Load model state from file.
Usage
MLLpNormScaler$load(filename)
Arguments
filenameString path to load input from.
Returns
Value.
MLLpNormScaler$clone()
The objects of this class are cloneable with this method.
Usage
MLLpNormScaler$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
X <- matrix(rnorm(50 * 5), 50, 5)
scaler <- MLLpNormScaler$new(norm_type = 2)
scaler$fit(X)
X_norm <- scaler$transform_inplace(X)
Principal Component Analysis
Description
Fits PCA to a data matrix, retaining the top-M principal
components. Centering/normalization is applied to X in-place at
construction time (the R matrix or the memory-mapped file itself, no
copy) and undone by restore(), which may be called before or
after fit() and is idempotent; an object that is garbage-collected
without restore() writes X back in its finalizer (the
same rule as the T-solvers).
Details
Wraps the C++ PCA class. The instance is bound to X
at creation (mirroring the C++ constructor); fit() is single-use.
The fit result is cached internally; use the get_*() accessors or
pass X_new to transform() for out-of-sample scoring.
Methods
Public methods
MLPCA$new()
Initialize PCA bound to X. Centering/normalization
is applied to X in-place immediately.
Usage
MLPCA$new(X, M, center = TRUE, normalize = TRUE, n_threads = NULL)
Arguments
XA numeric matrix (n x p), or an
mmap_matrix("readwrite": the file is modified). Modified in place when centering/normalizing; callrestore()to undo.MInteger, number of principal components.
centerLogical, whether to center
Xin-place (default:TRUE).normalizeLogical, whether to scale the columns of
Xin-place (default:TRUE).n_threadsInteger, the thread budget of the matrix products of
fit()andtransform()(NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLPCA$fit()
Fit the PCA bound at construction time (single-use).
Usage
MLPCA$fit()
Returns
Invisible self for method chaining.
MLPCA$transform()
Project new data onto the fitted principal subspace.
Usage
MLPCA$transform(X_new)
Arguments
X_newA numeric matrix (n_new x p), or an
mmap_matrix(zero-copy). The stored training means/norms are applied before projection.
Returns
Score matrix (n_new x M).
MLPCA$restore()
Restore X to its original values (un-center/un-scale).
Usage
MLPCA$restore()
Returns
Invisible self.
MLPCA$get_scores()
Get the PC score matrix from the fit() call.
Usage
MLPCA$get_scores()
Returns
Score matrix (n x M), or NULL if fit() not yet called.
MLPCA$get_loadings()
Get loading matrix from the fit() call.
Usage
MLPCA$get_loadings()
Returns
Loading matrix (p x M), or NULL if fit() not yet called.
MLPCA$get_explained_variance()
Get explained variance per component from the fit() call.
Usage
MLPCA$get_explained_variance()
Returns
Numeric vector of length M, or NULL if fit() not yet called.
MLPCA$get_means()
Get the column means used for centering.
Usage
MLPCA$get_means()
Returns
Numeric vector of length p. Zero-vector when center = FALSE.
MLPCA$get_norms()
Get the column scaling factors used for normalization.
Usage
MLPCA$get_norms()
Returns
Numeric vector of length p. Ones when normalize = FALSE.
MLPCA$clone()
The objects of this class are cloneable with this method.
Usage
MLPCA$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
G. Guennebaud, B. Jacob et al., Eigen v3, https://libeigen.gitlab.io/, 2010.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(42)
X <- matrix(rnorm(50 * 8), 50, 8)
pca <- MLPCA$new(X, M = 3, center = TRUE)
pca$fit()
pca$get_explained_variance()
X_new <- matrix(rnorm(10 * 8), 10, 8)
pca$transform(X_new)
pca$restore()
Ridge Regression Solver
Description
Solves the ridge regression problem
\min_\beta \|y - X\beta\|^2 + \lambda \|\beta\|^2
for a single regularization value. Dispatches internally between primal
(n \ge p) and dual (n < p) Cholesky paths.
Details
Wraps the C++ MLRidge::solve(X, y, lambda) static method.
Methods
Public methods
MLRidge$solve()
Solve ridge regression for a single lambda.
Usage
MLRidge$solve(X, y, lambda, n_threads = NULL)
Arguments
XA numeric matrix (n x p), or an
mmap_matrix(bound zero-copy;"readonly"suffices).yNumeric response vector of length n.
lambdaNon-negative regularization parameter.
n_threadsInteger, the thread budget of the matrix products (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
Returns
Coefficient vector of length p.
MLRidge$clone()
The objects of this class are cloneable with this method.
Usage
MLRidge$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
A. E. Hoerl and R. W. Kennard, "Ridge Regression: Biased Estimation for Nonorthogonal Problems," Technometrics, vol. 42, no. 1, pp. 80-86, 2000 (Reprint of the 1970 article in the Special 40th Anniversary Issue).
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(42)
n <- 40; p <- 5
X <- matrix(rnorm(n * p), n, p)
beta_true <- c(1, -2, 0, 0.5, 0)
y <- X %*% beta_true + rnorm(n, sd = 0.1)
solver <- MLRidge$new()
beta_hat <- solver$solve(X, y, lambda = 0.01)
Ridge Regression with Cross-Validation
Description
Performs explicit K-Fold cross-validation for Ridge Regression model selection.
Methods
Public methods
MLRidgeCV$new()
Initialize the MLRidgeCV object.
Usage
MLRidgeCV$new(low_memory = FALSE, n_threads = NULL)
Arguments
low_memoryLogical (default
FALSE).FALSE: each fold gathers and standardizes its training rows and takes a thin SVD (about three to four copies of X in flight).TRUE: the dual (kernel) form — n x n kernels accumulated from column blocks of X read in place (anmmap_matrixincluded,"readonly"suffices), no p-dimensional coefficients; same estimator, grid and rank rule, agreement to numerical precision; memory O(n^2) instead of O(n p), the route for p >> n.n_threadsInteger, the thread budget of the fit's matrix products (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLRidgeCV$fit()
Fit the CV model.
Usage
MLRidgeCV$fit( X, y, n_folds = 10, n_lambda = 100, lambda_ratio = 1000, seed = 0 )
Arguments
XPredictor matrix, or an
mmap_matrixcreated bymem_matrix/mem_matrix_from(bound zero-copy;"readonly"mode suffices since the fit does not modifyX).yResponse vector.
n_foldsNumber of folds (default 10).
n_lambdaNumber of lambdas in the path (default 100).
lambda_ratioRatio of max to min lambda (default 1000).
seedRandom seed for CV splits (default 0).
Returns
Value.
MLRidgeCV$cv_min()
Get lambda that minimizes CV error.
Usage
MLRidgeCV$cv_min()
Returns
Value.
MLRidgeCV$cv_1se()
Get 1SE rule lambda.
Usage
MLRidgeCV$cv_1se()
Returns
Value.
MLRidgeCV$index_min()
Get index of minimum CV error.
Usage
MLRidgeCV$index_min()
Returns
Value.
MLRidgeCV$index_1se()
Get index of 1SE rule lambda.
Usage
MLRidgeCV$index_1se()
Returns
Value.
MLRidgeCV$get_lambdas()
Get the sequence of lambdas used.
Usage
MLRidgeCV$get_lambdas()
Returns
Value.
MLRidgeCV$get_cv_errors()
Get the CV mean squared errors for each lambda.
Usage
MLRidgeCV$get_cv_errors()
Returns
Value.
MLRidgeCV$get_cv_std()
Get the standard error of the CV errors.
Usage
MLRidgeCV$get_cv_std()
Returns
Value.
MLRidgeCV$interpolates()
Whether the smallest training fold has p >= n_train, so
the lambda -> 0 end of the grid tends to the minimum-norm
interpolator instead of an ordinary least-squares fit. The curve
still has a genuine interior minimum in that regime; together with
selection_at_grid_edge() it tells whether cv_min() is
a real minimum or the grid running out.
Usage
MLRidgeCV$interpolates()
Returns
Logical.
MLRidgeCV$selection_at_grid_edge()
Whether cv_min() or cv_1se() landed on the
first or the last grid point. The pick is then the grid boundary,
not an optimum, and lambda_ratio or n_lambda need
widening.
Usage
MLRidgeCV$selection_at_grid_edge()
Returns
Logical.
MLRidgeCV$clone()
The objects of this class are cloneable with this method.
Usage
MLRidgeCV$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
A. E. Hoerl and R. W. Kennard, "Ridge Regression: Biased Estimation for Nonorthogonal Problems," Technometrics, vol. 42, no. 1, pp. 80-86, 2000 (Reprint of the 1970 article in the Special 40th Anniversary Issue).
G. Guennebaud, B. Jacob et al., Eigen v3, https://libeigen.gitlab.io/, 2010.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
X <- matrix(rnorm(50 * 5), 50, 5)
y <- X[, 1] * 2 + rnorm(50)
cv <- MLRidgeCV$new()
cv$fit(X, y, n_folds = 5)
cv$cv_min()
cv$selection_at_grid_edge() # FALSE: the picks are interior grid points
SVD Solver
Description
Computes the top-M truncated SVD of a matrix. Dispatches
internally between a direct (tall matrices), Gram (wide matrices), and
randomized path based on the shape of X.
Details
Wraps the C++ MLSVD::compute(X, M) static method.
Methods
Public methods
MLSVD$new()
Initialize the solver with its dispatch thresholds.
Usage
MLSVD$new(min_dim_thresh = 10000, block_size = 1024, n_threads = NULL)
Arguments
min_dim_threshInteger (default 10000). The direct path (a Jacobi SVD that copies X and computes every singular triplet) is taken while
min(n, p)is below it; above it, and whenM < min(n, p) / 10, the randomized path runs two block-wise passes over X without a copy (the route for a largemmap_matrix).p > 2 nalways takes the Gram path.block_sizeInteger (default 1024): the column block of the block-wise passes.
n_threadsInteger, the thread budget of the matrix products (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLSVD$compute()
Compute top-M singular value decomposition of X.
Usage
MLSVD$compute(X, M)
Arguments
XA numeric matrix (n x p), or an
mmap_matrix(bound zero-copy;"readonly"suffices).MInteger, number of singular components to retain.
Returns
Named list with:
-
ULeft singular vectors (n x M). -
SSingular values (M). -
VRight singular vectors (p x M).
MLSVD$clone()
The objects of this class are cloneable with this method.
Usage
MLSVD$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
G. Guennebaud, B. Jacob et al., Eigen v3, https://libeigen.gitlab.io/, 2010.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(42)
X <- matrix(rnorm(50 * 10), 50, 10)
solver <- MLSVD$new()
res <- solver$compute(X, M = 3)
dim(res$U) # 50 x 3
Z-Score Scaler
Description
Standardizes features by removing the mean and scaling to unit
variance (Bessel-corrected, n - 1). The center/scale arguments follow
R's scale(): with center = FALSE, scale = TRUE
columns are divided by the root-mean-square around 0.
Details
The *_inplace methods mutate X directly (zero-copy)
when it is a double-storage matrix; other inputs are coerced to a double
matrix first, in which case the coerced copy is modified. The (modified)
matrix is returned in both cases. X may also be an
mmap_matrix created by mem_matrix /
mem_matrix_from: the disk-backed buffer is then
bound zero-copy through the same Eigen map interface and modified in
place on disk. All scaler methods — including fit() — require the
handle to be open in "readwrite" mode, because the scaler core
binds a mutable map.
Methods
Public methods
MLZScoreScaler$new()
Initialize the MLZScoreScaler
Usage
MLZScoreScaler$new(center = TRUE, scale = TRUE, n_threads = NULL)
Arguments
centerLogical, whether to center columns to mean 0 (default: TRUE)
scaleLogical, whether to scale columns to unit SD (default: TRUE); around 0 instead of the mean when
center = FALSE, as in R's scale().n_threadsInteger, the thread budget of the column passes (
NULL, the default: the library's default budget,trex_get_num_threads(), initially 1).
MLZScoreScaler$fit()
Compute the centers and scales to be used for later scaling.
Usage
MLZScoreScaler$fit(X, threshold = 1e-12)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode (the scaler core binds a mutable map).thresholdDouble, lower bound for the scale statistic (default: 1e-12).
Returns
Value.
MLZScoreScaler$transform_inplace()
Perform standardization by centering and scaling in-place.
Usage
MLZScoreScaler$transform_inplace(X)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode.
Returns
The modified matrix X (the same handle for an mmap_matrix).
MLZScoreScaler$inverse_transform_inplace()
Inverse transform to original scale.
Usage
MLZScoreScaler$inverse_transform_inplace(X)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode.
Returns
The modified matrix X (the same handle for an mmap_matrix).
MLZScoreScaler$fit_transform_inplace()
Fit and transform in one call, like R's scale().
Usage
MLZScoreScaler$fit_transform_inplace(X, threshold = 1e-12)
Arguments
XA numeric matrix (n x p) or an
mmap_matrixin"readwrite"mode.thresholdDouble, lower bound for the scale statistic (default: 1e-12).
Returns
The modified matrix X (the same handle for an mmap_matrix).
MLZScoreScaler$is_fitted()
Check if scaler is fitted.
Usage
MLZScoreScaler$is_fitted()
Returns
Value.
MLZScoreScaler$get_dropped_indices()
Get dropped (degenerate) column indices. These columns get scale factor 1 and are still centered (sklearn semantics).
Usage
MLZScoreScaler$get_dropped_indices()
Returns
Value.
MLZScoreScaler$get_center()
Check if scaler centers data.
Usage
MLZScoreScaler$get_center()
Returns
Value.
MLZScoreScaler$get_scale()
Check if scaler scales data to unit variance.
Usage
MLZScoreScaler$get_scale()
Returns
Value.
MLZScoreScaler$get_centers()
Get the learned centers (column means).
Usage
MLZScoreScaler$get_centers()
Returns
Value.
MLZScoreScaler$get_scales()
Get the learned scales (standard deviations).
Usage
MLZScoreScaler$get_scales()
Returns
Value.
MLZScoreScaler$save()
Save model state to file.
Usage
MLZScoreScaler$save(filename)
Arguments
filenameString path to save output.
Returns
Value.
MLZScoreScaler$load()
Load model state from file.
Usage
MLZScoreScaler$load(filename)
Arguments
filenameString path to load input from.
Returns
Value.
MLZScoreScaler$clone()
The objects of this class are cloneable with this method.
Usage
MLZScoreScaler$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
X <- matrix(rnorm(50 * 5), 50, 5)
scaler <- MLZScoreScaler$new()
scaler$fit(X)
X_std <- scaler$transform_inplace(X)
scaler$get_centers()
T-ACGP Solver
Description
Terminating Approximate Conjugate Gradient Pursuit (T-ACGP) solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TACGP_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TACGP_Solver$new()
Create a new TACGP_Solver.
Usage
TACGP_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TACGP_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TACGP_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
T. Blumensath and M. E. Davies, "Gradient Pursuits," IEEE Trans. Signal Process., vol. 56, no. 6, pp. 2370-2382, 2008.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TACGP_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
T-AFS Solver
Description
Terminating Adaptive Forward Stepwise (T-AFS) solver.
The shrinkage parameter rho interpolates between Forward Stepwise
(rho = 1) and LAR/LASSO (rho -> 0).
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TAFS_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TAFS_Solver$new()
Create a new TAFS_Solver.
Usage
TAFS_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options; this solver readsrho_afs, the shrinkage parameter in (0, 1] (default 1: forward stepwise).
TAFS_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TAFS_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
I. Zhang and R. Tibshirani, "Adaptive Forward Stepwise: A Method for High Sparsity Regression," J. Mach. Learn. Res., vol. 27, pp. 1-24, 2026.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TACGP_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TAFS_Solver$new(X, D, y, options = tsolver_options(rho_afs = 0.5))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-CDENET Solver
Description
Terminating coordinate-descent Elastic Net (diagonal ridge lambda2,
the dummies get kappa_dummy * lambda2). The solver used internally
by TRexGVSSelector for en_solver = "TCDENET". Inherits the
CD getters from TCDSolver_Base and all common methods from
TSolver_Base.
Super classes
TSolver_Base -> TCDSolver_Base -> TCDENET_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()TCDSolver_Base$get_kkt_violation()TCDSolver_Base$get_lambda()TCDSolver_Base$get_lambda2()TCDSolver_Base$get_record_gaps()TCDSolver_Base$get_record_kkt_violations()TCDSolver_Base$is_certified_degraded()TCDSolver_Base$is_certified_localization()
TCDENET_Solver$new()
Create a new TCDENET_Solver.
Usage
TCDENET_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options; this solver readslambda2,kappa_dummyand thecd_*knobs.
TCDENET_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TCDENET_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
J. Friedman, T. Hastie, H. Höfling, and R. Tibshirani, "Pathwise Coordinate Optimization," Ann. Appl. Stat., vol. 1, no. 2, pp. 302-332, 2007, doi: 10.1214/07-AOAS131.
J. Friedman, T. Hastie, and R. Tibshirani, "Regularization Paths for Generalized Linear Models via Coordinate Descent," J. Stat. Softw., vol. 33, no. 1, pp. 1-22, 2010, doi: 10.18637/jss.v033.i01.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TCDENET_Solver$new(X, D, y, options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-CDIENET Solver
Description
Terminating coordinate-descent Informed Elastic Net: exact fixed-lambda1
IEN minimizers per dummy crossing with O(1) group-penalty hooks
(group_penalty = "MEAN", the canonical group-sum penalty, or
"CENTERING"). The solver used internally by TRexGVSSelector
for solver = "TCDIENET". Inherits the CD getters from
TCDSolver_Base and all common methods from
TSolver_Base.
Super classes
TSolver_Base -> TCDSolver_Base -> TCDIENET_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()TCDSolver_Base$get_kkt_violation()TCDSolver_Base$get_lambda()TCDSolver_Base$get_lambda2()TCDSolver_Base$get_record_gaps()TCDSolver_Base$get_record_kkt_violations()TCDSolver_Base$is_certified_degraded()TCDSolver_Base$is_certified_localization()
TCDIENET_Solver$new()
Create a new TCDIENET_Solver.
Usage
TCDIENET_Solver$new(X, D, y, groups, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies (a multiple of
ncol(X)columns: one group-aligned layer per p).yNumeric response vector.
groupsInteger vector of 1-based group ids, one per predictor column of
X(contiguous ids starting at 1).optionsSolver options from
tsolver_options; this solver readslambda2,group_penaltyand thecd_*knobs.
TCDIENET_Solver$get_groups()
Get the group ids (1-based, one per predictor).
Usage
TCDIENET_Solver$get_groups()
Returns
Integer vector of group ids.
TCDIENET_Solver$get_num_groups()
Get the number of disjoint groups.
Usage
TCDIENET_Solver$get_num_groups()
Returns
Integer count of groups.
TCDIENET_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TCDIENET_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "The Informed Elastic Net for Fast Grouped Variable Selection and FDR Control in Genomics Research," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 466-470.
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
J. Friedman, T. Hastie, H. Höfling, and R. Tibshirani, "Pathwise Coordinate Optimization," Ann. Appl. Stat., vol. 1, no. 2, pp. 302-332, 2007, doi: 10.1214/07-AOAS131.
J. Friedman, T. Hastie, and R. Tibshirani, "Regularization Paths for Generalized Linear Models via Coordinate Descent," J. Stat. Softw., vol. 33, no. 1, pp. 1-22, 2010, doi: 10.18637/jss.v033.i01.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 4
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TCDIENET_Solver$new(X, D, y, groups = c(1, 1, 2, 2),
options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-CDLASSO Solver
Description
Terminating coordinate-descent LASSO: exact penalized-lasso minimizers at
every dummy crossing, localized with certificates (duality gap and
coordinate statuses; cd_certified_localization = FALSE in the
options selects the LEGACY probe bisection). The base of the CD family
(TCDENET_Solver, TCDIENET_Solver, TCDTIKNET_Solver
inherit its getters). Inherits all common methods from
TSolver_Base.
Super classes
TSolver_Base -> TCDSolver_Base -> TCDLASSO_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()TCDSolver_Base$get_kkt_violation()TCDSolver_Base$get_lambda()TCDSolver_Base$get_lambda2()TCDSolver_Base$get_record_gaps()TCDSolver_Base$get_record_kkt_violations()TCDSolver_Base$is_certified_degraded()TCDSolver_Base$is_certified_localization()
TCDLASSO_Solver$new()
Create a new TCDLASSO_Solver.
Usage
TCDLASSO_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options; this solver reads thecd_*knobs.
TCDLASSO_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TCDLASSO_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
R. Tibshirani, "Regression Shrinkage and Selection via the Lasso," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 58, no. 1, pp. 267-288, 1996.
J. Friedman, T. Hastie, H. Höfling, and R. Tibshirani, "Pathwise Coordinate Optimization," Ann. Appl. Stat., vol. 1, no. 2, pp. 302-332, 2007, doi: 10.1214/07-AOAS131.
J. Friedman, T. Hastie, and R. Tibshirani, "Regularization Paths for Generalized Linear Models via Coordinate Descent," J. Stat. Softw., vol. 33, no. 1, pp. 1-22, 2010, doi: 10.18637/jss.v033.i01.
W. J. Fu, "Penalized Regression: The Bridge Versus the Lasso," J. Comput. Graph. Statist., vol. 7, pp. 397-416, 1998.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TCDLASSO_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
solver$is_certified_localization()
CD-family base class
Description
Shared getters of the coordinate-descent solver family
(TCDLASSO_Solver, TCDENET_Solver, TCDIENET_Solver,
TCDTIKNET_Solver): the recorded lambda_1 path, the quadratic penalty
weight, and the certified-localization diagnostics. Not intended for direct
instantiation.
Super class
TSolver_Base -> TCDSolver_Base
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$initialize()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TCDSolver_Base$get_lambda()
Get lambda_1 at every recorded step.
Usage
TCDSolver_Base$get_lambda()
Returns
Numeric vector, one per step.
TCDSolver_Base$get_lambda2()
Get the quadratic penalty weight lambda2 (0 for T-CDLASSO).
Usage
TCDSolver_Base$get_lambda2()
Returns
Scalar numeric lambda2.
TCDSolver_Base$is_certified_localization()
Is the certified crossing localization active?
Usage
TCDSolver_Base$is_certified_localization()
Returns
Logical.
TCDSolver_Base$is_certified_degraded()
Did certification become unavailable along the path (A0-w boundary), so the solver fell back to LEGACY localization?
Usage
TCDSolver_Base$is_certified_degraded()
Returns
Logical.
TCDSolver_Base$get_record_gaps()
Get the duality gap at every recorded step.
Usage
TCDSolver_Base$get_record_gaps()
Returns
Numeric vector, one per step.
TCDSolver_Base$get_record_kkt_violations()
Get the KKT violation at every recorded step.
Usage
TCDSolver_Base$get_record_kkt_violations()
Returns
Numeric vector, one per step.
TCDSolver_Base$get_kkt_violation()
KKT violation of the current state (a certificate of the coordinate-descent minimizer).
Usage
TCDSolver_Base$get_kkt_violation(lambda1 = -1)
Arguments
lambda1The lambda_1 to certify at; negative (default) uses the solver's current one.
Returns
Numeric scalar.
TCDSolver_Base$clone()
The objects of this class are cloneable with this method.
Usage
TCDSolver_Base$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
T-CDTIKNET Solver
Description
Terminating coordinate-descent Tikhonov Net: exact fixed-lambda1
minimizers per dummy crossing under the general quadratic penalty
lambda2 * t(beta) K beta with a sparse PSD K. Dummy coupling
per fold_dummies in the options (FALSE: independent
kappa_dummy ridge; TRUE: FOLDED layered convention). The
solver used internally by TRexTikhonovSelector for
solver = "TCDTIKNET". Inherits the CD getters from
TCDSolver_Base and all common methods from
TSolver_Base.
Super classes
TSolver_Base -> TCDSolver_Base -> TCDTIKNET_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()TCDSolver_Base$get_kkt_violation()TCDSolver_Base$get_lambda()TCDSolver_Base$get_lambda2()TCDSolver_Base$get_record_gaps()TCDSolver_Base$get_record_kkt_violations()TCDSolver_Base$is_certified_degraded()TCDSolver_Base$is_certified_localization()
TCDTIKNET_Solver$new()
Create a new TCDTIKNET_Solver.
Usage
TCDTIKNET_Solver$new(X, D, y, tikhonov_K, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies (a multiple of
ncol(X)columns whenfold_dummies = TRUE).yNumeric response vector.
tikhonov_Kp x p PSD Tikhonov matrix: a
Matrix::dgCMatrixor a dense matrix.optionsSolver options from
tsolver_options; this solver readslambda2,kappa_dummy,fold_dummiesand thecd_*knobs.
TCDTIKNET_Solver$is_folded_dummy_coupling()
Is the FOLDED dummy coupling active?
Usage
TCDTIKNET_Solver$is_folded_dummy_coupling()
Returns
Logical.
TCDTIKNET_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TCDTIKNET_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
A. N. Tikhonov, "Solution of Incorrectly Formulated Problems and the Regularization Method," Soviet Math. Dokl., vol. 4, pp. 1035-1038, 1963 (English translation of Dokl. Akad. Nauk SSSR 151 (1963), no. 3, 501-504).
Y. Park, L. Reichel, G. Rodriguez, and X. Yu, "Parameter Determination for Tikhonov Regularization Problems in General Form," J. Comput. Appl. Math., vol. 343, pp. 12-25, 2018, doi: 10.1016/j.cam.2018.04.049.
J. Friedman, T. Hastie, H. Höfling, and R. Tibshirani, "Pathwise Coordinate Optimization," Ann. Appl. Stat., vol. 1, no. 2, pp. 302-332, 2007, doi: 10.1214/07-AOAS131.
J. Friedman, T. Hastie, and R. Tibshirani, "Regularization Paths for Generalized Linear Models via Coordinate Descent," J. Stat. Softw., vol. 33, no. 1, pp. 1-22, 2010, doi: 10.18637/jss.v033.i01.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 4
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TCDTIKNET_Solver$new(X, D, y, tikhonov_K = diag(p),
options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-ENET-Aug Solver
Description
Terminating Elastic Net solver via row augmentation (TENETAug). The ridge
penalty is encoded in an augmented data system solved by an inner T-LASSO
(or pure T-LARS) path, matching the R reference implementation of
trex_GVS(). Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TENETAug_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TENETAug_Solver$new()
Create a new TENETAug_Solver.
Usage
TENETAug_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options; this solver readslambda2(the ridge penalty, >= 0) andtenet_aug_use_lars(run the inner path with a pure-LARS solver that never drops variables).
TENETAug_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TENETAug_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "False Discovery Rate Control for Grouped Variable Selection in High-Dimensional Linear Models Using the T-Knock Filter," in Proc. 30th Eur. Signal Process. Conf. (EUSIPCO), 2022, pp. 892-896.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TENETAug_Solver$new(X, D, y, options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-ENET Solver
Description
Terminating Elastic Net solver (L1 + L2 regularization).
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TENET_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TENET_Solver$new()
Create a new TENET_Solver.
Usage
TENET_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options; this solver readslambda2, the L2 (ridge) penalty (>= 0; the default 0 is the plain lasso path).
TENET_Solver$get_num_removals()
Get the number of coefficient removals.
Usage
TENET_Solver$get_num_removals()
Returns
Integer count of removals.
TENET_Solver$get_cycling_ratio()
Get the cycling ratio (removals / total steps).
Usage
TENET_Solver$get_cycling_ratio()
Returns
Scalar numeric cycling ratio.
TENET_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TENET_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TENET_Solver$get_alpha()
The elastic-net mixing alpha implied by lambda2.
Usage
TENET_Solver$get_alpha()
Returns
Numeric scalar.
TENET_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TENET_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TENET_Solver$new(X, D, y, options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-GP Solver
Description
Terminating Gradient Pursuit (T-GP) solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TGP_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TGP_Solver$new()
Create a new TGP_Solver.
Usage
TGP_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TGP_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TGP_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
T. Blumensath and M. E. Davies, "Gradient Pursuits," IEEE Trans. Signal Process., vol. 56, no. 6, pp. 2370-2382, 2008.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TGP_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
T-IENET-Aug Solver
Description
Terminating Informed Elastic Net solver via row augmentation (TIENETAug).
The group-ridge penalty (one augmented row per group, scaled by
sqrt(lambda2)) is encoded in an augmented data system solved by an
inner T-LASSO (or pure T-LARS) path. This is the solver used internally by
TRexGVSSelector for gvs_type = "IEN".
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TIENETAug_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TIENETAug_Solver$new()
Create a new TIENETAug_Solver.
Usage
TIENETAug_Solver$new(X, D, y, groups, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
groupsInteger vector of 1-based group ids, one per predictor column of
X(contiguous ids starting at 1).optionsSolver options from
tsolver_options; this solver readslambda2(the group-ridge penalty, >= 0) andtenet_aug_use_lars(run the inner path with a pure-LARS solver that never drops variables).
TIENETAug_Solver$get_lambda2()
Get the group-ridge penalty lambda2 used.
Usage
TIENETAug_Solver$get_lambda2()
Returns
Scalar numeric lambda2.
TIENETAug_Solver$get_groups()
Get the group ids (1-based, one per predictor).
Usage
TIENETAug_Solver$get_groups()
Returns
Integer vector of group ids.
TIENETAug_Solver$get_num_groups()
Get the number of disjoint groups.
Usage
TIENETAug_Solver$get_num_groups()
Returns
Integer group count.
TIENETAug_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TIENETAug_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "The Informed Elastic Net for Fast Grouped Variable Selection and FDR Control in Genomics Research," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 466-470.
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 4
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
groups <- c(1, 1, 2, 2) # 1-based group id per predictor
solver <- TIENETAug_Solver$new(X, D, y, groups = groups,
options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-IENET Solver (native pathwise)
Description
Terminating Informed Elastic Net solver, native LARS homotopy on the
group-ridge penalty (no augmented copies). The solver used internally by
TRexGVSSelector for gvs_type = "IEN" with
solver = "TIENET". Inherits all common methods from
TSolver_Base.
Super class
TSolver_Base -> TIENET_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TIENET_Solver$new()
Create a new TIENET_Solver.
Usage
TIENET_Solver$new(X, D, y, groups, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies (a multiple of
ncol(X)columns whenlambda2 > 0: one group-aligned layer per p).yNumeric response vector.
groupsInteger vector of 1-based group ids, one per predictor column of
X(contiguous ids starting at 1).optionsSolver options from
tsolver_options; this solver readslambda2(the group-ridge penalty, >= 0).
TIENET_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TIENET_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TIENET_Solver$get_lambda2()
Get the group-ridge penalty lambda2 used.
Usage
TIENET_Solver$get_lambda2()
Returns
Scalar numeric lambda2.
TIENET_Solver$get_groups()
Get the group ids (1-based, one per predictor).
Usage
TIENET_Solver$get_groups()
Returns
Integer vector of group ids.
TIENET_Solver$get_num_groups()
Get the number of disjoint groups.
Usage
TIENET_Solver$get_num_groups()
Returns
Integer count of groups.
TIENET_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TIENET_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "The Informed Elastic Net for Fast Grouped Variable Selection and FDR Control in Genomics Research," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 466-470.
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 4
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
groups <- c(1, 1, 2, 2) # 1-based group id per predictor
solver <- TIENET_Solver$new(X, D, y, groups = groups,
options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-TIKNET Solver
Description
Terminating Tikhonov Net solver: native LARS homotopy with a general
quadratic penalty lambda2 * t(beta) K beta on the folded sums (a
sparse PSD K = t(Gamma) Gamma, see trex_gamma_to_k).
FOLDED dummy coupling only. The solver used internally by
TRexTikhonovSelector for solver = "TIKNET". Inherits all
common methods from TSolver_Base.
Super class
TSolver_Base -> TIKNET_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TIKNET_Solver$new()
Create a new TIKNET_Solver.
Usage
TIKNET_Solver$new(X, D, y, tikhonov_K, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies (a multiple of
ncol(X)columns whenlambda2 > 0: FOLDED layered convention).yNumeric response vector.
tikhonov_Kp x p PSD Tikhonov matrix: a
Matrix::dgCMatrixor a dense matrix.optionsSolver options from
tsolver_options; this solver readslambda2(the quadratic penalty weight, >= 0).
TIKNET_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TIKNET_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TIKNET_Solver$get_lambda2()
Get the quadratic penalty weight lambda2 used.
Usage
TIKNET_Solver$get_lambda2()
Returns
Scalar numeric lambda2.
TIKNET_Solver$get_tikhonov_k()
The Tikhonov matrix K used (sparse dgCMatrix).
Usage
TIKNET_Solver$get_tikhonov_k()
Returns
A Matrix::dgCMatrix (p x p).
TIKNET_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TIKNET_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
A. N. Tikhonov, "Solution of Incorrectly Formulated Problems and the Regularization Method," Soviet Math. Dokl., vol. 4, pp. 1035-1038, 1963 (English translation of Dokl. Akad. Nauk SSSR 151 (1963), no. 3, 501-504).
Y. Park, L. Reichel, G. Rodriguez, and X. Yu, "Parameter Determination for Tikhonov Regularization Problems in General Form," J. Comput. Appl. Math., vol. 343, pp. 12-25, 2018, doi: 10.1016/j.cam.2018.04.049.
A. E. Hoerl and R. W. Kennard, "Ridge Regression: Biased Estimation for Nonorthogonal Problems," Technometrics, vol. 42, no. 1, pp. 80-86, 2000 (Reprint of the 1970 article in the Special 40th Anniversary Issue).
Y. Miche, M. van Heeswijk, P. Bas, O. Simula, and A. Lendasse, "TROP-ELM: A Double-Regularized ELM Using LARS and Tikhonov Regularization," Neurocomputing, vol. 74, pp. 2413-2421, 2011, doi: 10.1016/j.neucom.2010.12.042.
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 4
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
K <- diag(p)
solver <- TIKNET_Solver$new(X, D, y, tikhonov_K = K,
options = tsolver_options(lambda2 = 0.1))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-LARS Solver
Description
Terminating Least Angle Regression (T-LARS) solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TLARS_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TLARS_Solver$new()
Create a new TLARS_Solver.
Usage
TLARS_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TLARS_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TLARS_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TLARS_Solver$get_kahan_refresh_interval()
Kahan refresh interval of the LARS-family solver (steps between exact refreshes of the compensated sums).
Usage
TLARS_Solver$get_kahan_refresh_interval()
Returns
Integer.
TLARS_Solver$set_kahan_refresh_interval()
Set the Kahan refresh interval.
Usage
TLARS_Solver$set_kahan_refresh_interval(interval)
Arguments
intervalPositive integer.
Returns
Invisibly returns self.
TLARS_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TLARS_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TLARS_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
solver$get_actives()
T-LASSO Solver
Description
Terminating LASSO solver (T-LARS with variable removal).
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TLASSO_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TLASSO_Solver$new()
Create a new TLASSO_Solver.
Usage
TLASSO_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TLASSO_Solver$get_num_removals()
Get the number of coefficient removals.
Usage
TLASSO_Solver$get_num_removals()
Returns
Integer count of removals.
TLASSO_Solver$get_cycling_ratio()
Get the cycling ratio (removals / total steps).
Usage
TLASSO_Solver$get_cycling_ratio()
Returns
Scalar numeric cycling ratio.
TLASSO_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TLASSO_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TLASSO_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TLASSO_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
R. Tibshirani, "Regression Shrinkage and Selection via the Lasso," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 58, no. 1, pp. 267-288, 1996.
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
M. R. Osborne, B. Presnell, and B. A. Turlach, "On the LASSO and Its Dual," J. Comput. Graph. Statist., vol. 9, no. 2, pp. 319-337, 2000.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TLASSO_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
T-MP Solver
Description
Terminating Matching Pursuit (T-MP) solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TMP_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TMP_Solver$new()
Create a new TMP_Solver.
Usage
TMP_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TMP_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TMP_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
S. G. Mallat and Z. Zhang, "Matching Pursuits with Time-Frequency Dictionaries," IEEE Trans. Signal Process., vol. 41, no. 12, pp. 3397-3415, 1993, doi: 10.1109/78.258082.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TMP_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
T-NCGMP Solver
Description
Terminating Norm-Corrected Gradient Matching Pursuit (T-NCGMP) solver.
Two variants are available: "line_search" (standard, 1-D projection)
and "fully_corrective" (OMP-style least squares over the active set).
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TNCGMP_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TNCGMP_Solver$new()
Create a new TNCGMP_Solver.
Usage
TNCGMP_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options; this solver readsncgmp_variant:"line_search"(default) or"fully_corrective".
TNCGMP_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TNCGMP_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
F. Locatello, R. Khanna, M. Tschannen, and M. Jaggi, "A Unified Optimization View on Generalized Matching Pursuit and Frank-Wolfe," in Proc. 20th Int. Conf. Artif. Intell. Statist. (AISTATS), JMLR: W&CP vol. 54, 2017.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TNCGMP_Solver$new(X, D, y,
options = tsolver_options(ncgmp_variant = "line_search"))
solver$execute_step(T_stop = 3)
solver$get_beta()
T-OMP Solver
Description
Terminating Orthogonal Matching Pursuit (T-OMP) solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TOMP_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TOMP_Solver$new()
Create a new TOMP_Solver.
Usage
TOMP_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TOMP_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TOMP_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
Y. C. Pati, R. Rezaiifar, and P. S. Krishnaprasad, "Orthogonal Matching Pursuit: Recursive Function Approximation with Applications to Wavelet Decomposition," in Proc. 27th Asilomar Conf. Signals, Syst., Comput., 1993, pp. 40-44.
J. A. Tropp, "Greed is Good: Algorithmic Results for Sparse Approximation," IEEE Trans. Inf. Theory, vol. 50, no. 10, pp. 2231-2242, 2004, doi: 10.1109/TIT.2004.834793.
T. Blumensath and M. E. Davies, "On the Difference Between Orthogonal Matching Pursuit and Orthogonal Least Squares," unpublished note, draft of March 29, 2007.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TOMP_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
T-OLS Solver
Description
Terminating Orthogonal Least Squares (T-OLS) solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TOOLS_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TOOLS_Solver$new()
Create a new TOOLS_Solver.
Usage
TOOLS_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TOOLS_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TOOLS_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
S. Chen, S. A. Billings, and W. Luo, "Orthogonal Least Squares Methods and Their Application to Non-Linear System Identification," Int. J. Control, vol. 50, no. 5, pp. 1873-1896, 1989, doi: 10.1080/00207178908953472.
T. Blumensath and M. E. Davies, "On the Difference Between Orthogonal Matching Pursuit and Orthogonal Least Squares," unpublished note, draft of March 29, 2007.
F. Scheidt and M. Muma, "Terminating Greedy Pursuits for High-Dimensional False Discovery Rate Control," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2026, pp. 2511-2515.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TOOLS_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
Biobank Screen T-Rex Selector
Description
Genomic biobank phenotype screening algorithm based on TRex architecture.
Methods
Public methods
TRexBiobankScreeningSelector$new()
Create a new TRexBiobankScreeningSelector object.
Usage
TRexBiobankScreeningSelector$new( X, Y, tFDR = 0.1, seed = -1, verbose = TRUE, biobank_control = trex_biobank_control(), screen_control = trex_screen_control(), control = trex_control() )
Arguments
XFeature matrix (n x p), or an
mmap_matrixopened"readwrite"(mapped directly, no copy; the screening's inner selectors normalize it in place per call and restore it).YResponse vector (1D) or matrix (2D).
tFDRTarget FDR level (default: 0.1).
seedRandom seed (default: -1).
verboseWhether to print progress (default: TRUE).
biobank_controlA biobank control list from
trex_biobank_control()(default:trex_biobank_control()).screen_controlA screen control list from
trex_screen_control()(default:trex_screen_control()).controlA control list from
trex_control()(default:trex_control()). Thelloop_strategyfield is forced to "STANDARD".
TRexBiobankScreeningSelector$select()
Run the Biobank Screening algorithm.
Usage
TRexBiobankScreeningSelector$select()
Returns
For a vector Y, a single per-phenotype record: a named list
with phenotype_index, selected_indices, estimated_FDR,
method_used, estimated_FDR_screen_ordinary,
estimated_FDR_screen_bootstrap, selected_indices_screen_ordinary,
selected_indices_screen_bootstrap, and used_fallback_trex
(indices are 1-based). For a matrix Y, a plain list of such records,
one per column, so res[[i]] has the same shape as the vector case.
This mirrors the Python binding, which returns one result object (vector)
or a list of them (matrix). A tidy summary table is one line away, e.g.
do.call(rbind, lapply(res, function(r)
as.data.frame(r[c("phenotype_index", "estimated_FDR", "method_used", "used_fallback_trex")]))).
TRexBiobankScreeningSelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexBiobankScreeningSelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "False Discovery Rate Control for Fast Screening of Large-Scale Genomics Biobanks," in Proc. 22nd IEEE Statist. Signal Process. Workshop (SSP), 2023, pp. 666-670.
F. Scheidt, J. Machkour, and M. Muma, "Solving FDR-Controlled Sparse Regression Problems with Five Million Variables on a Laptop," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 116-120.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
sel <- TRexBiobankScreeningSelector$new(X, y, tFDR = 0.1, verbose = FALSE)
res <- sel$select()
res$selected_indices
Dependency-Aware T-Rex Selector (TRexDA)
Description
FDR-controlled variable selection algorithm for dependency scenarios.
Super class
TRexSelector -> TRexDASelector
Active bindings
rho_threshOptimal correlation threshold selected by the DA process.
rho_gridThe grid of correlation thresholds evaluated.
da_method_usedThe integer code (or name mapped later) of the DA method used.
FDP_hat_array_BTA 3D array of FDP estimates for BT method: (Variables x Thresholds x K).
Phi_array_BTA 3D array of variables selected for BT method.
R_array_BTA 3D array mapping original to clustered features for BT method.
cor_coefThe correlation coefficient of the dependency-aware dummy generation (AR1 / EQUI methods).
Methods
Public methods
Inherited methods
TRexDASelector$new()
Create a new TRexDASelector object.
Usage
TRexDASelector$new( X, y, tFDR = 0.1, seed = -1, verbose = TRUE, da_control = trex_da_control(), control = trex_control() )
Arguments
XFeature matrix or MemoryMappedMatrix.
yResponse vector.
tFDRTarget FDR level (default: 0.1).
seedRandom seed (default: -1).
verboseWhether to print progress (default: TRUE).
da_controlA DA control list from
trex_da_control()(default:trex_da_control()).controlA control list from
trex_control()(default:trex_control()).
TRexDASelector$select()
Run the Dependency-Aware TRexSelector algorithm.
Usage
TRexDASelector$select()
TRexDASelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexDASelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "High-Dimensional False Discovery Rate Control for Dependent Variables," Signal Process., vol. 234, Art. no. 109990, 2025, doi: 10.1016/j.sigpro.2025.109990.
J. Machkour, D. P. Palomar, and M. Muma, "FDR-Controlled Portfolio Optimization for Sparse Financial Index Tracking," in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2025, doi: 10.1109/ICASSP49660.2025.10890629.
J. Machkour, M. Muma, and D. P. Palomar, "FDR-Controlled Sparse Index Tracking with Autoregressive Stock Dependency Models," in Proc. Eur. Signal Process. Conf. (EUSIPCO), 2024, pp. 2662-2666.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
sel <- TRexDASelector$new(X, y, tFDR = 0.1, verbose = FALSE,
da_control = trex_da_control(da_method = "BT"))
sel$select()
sel$selected_indices
T-Rex Selector with Group Variable Selection (TRex GVS)
Description
FDR-controlled variable selection algorithm utilizing group-based structural augmentation.
Super class
TRexSelector -> TRexGVSSelector
Active bindings
lambda2_usedLambda2 regularization term selected/applied.
lambda2_cv_diagnosticsHealth record of the lambda_2 tuner of the last
select(): a list withran,seconds,n_profile_at_edge(lambda_2 values whose profiled lambda_1 optimum sat on a truncation edge; 0 is healthy),support_cap(-1 = disabled),dfmax_ratio(IEN tuner: thecv_dfmax_ratioit was called with; 0 when no IEN-geometry tuner ran),low_dimensional, and the boundary-pick guard fields:grid_index/grid_size(0-based position of the returned lambda_2 on the tuner's grid),at_grid_edge(the pick is the first or last grid point, so the grid boundary rather than a CV optimum),profile_at_edge(IEN tuner: the profiled lambda_1 optimum of the chosen lambda_2 sat on the truncation edge),profile_at_support_cap(that edge is the support cap; raisecv_dfmax_ratioto move it) andboundary_pick(at_grid_edgeorprofile_at_edge; the selector warned once and returned the pick unchanged).gvs_typeThe augmentation policy name used (e.g., "EN", "IEN").
max_clustersThe number of unique clusters dynamically formulated.
groupsInteger vector of length
pgiving the 1-based cluster label assigned to each variable (prior groups for Route 1, or the hierarchical-clustering assignment for Route 2). Enables computing cluster diagnostics (e.g. purity) on the R side.group_labelsOptional human-readable cluster names (length
max_clusters), or an empty character vector when none were supplied.hc_method_usedThe hierarchical-clustering linkage the GVS augmentation actually used.
Methods
Public methods
Inherited methods
TRexGVSSelector$new()
Create a new TRexGVSSelector object.
Usage
TRexGVSSelector$new( X, y, tFDR = 0.1, seed = -1, verbose = TRUE, gvs_control = trex_gvs_control(), control = trex_control() )
Arguments
XFeature matrix or MemoryMappedMatrix.
yResponse vector.
tFDRTarget FDR level (default: 0.1).
seedRandom seed (default: -1).
verboseWhether to print progress (default: TRUE).
gvs_controlA GVS control list from
trex_gvs_control()(default:trex_gvs_control()). Forgvs_type = "EN"the solver is derived fromen_solver(TENET, TENET_AUG, or TCDENET) and thesolverfield incontrolis ignored (a warning is issued if it is set to a non-matching solver). Forgvs_type = "IEN"thesolverfield selects the IEN solver: "TIENET" (default, native pathwise), "TIENET_AUG", or "TCDIENET".controlA control list from
trex_control()(default:trex_control()). Forgvs_type = "EN"thesolverfield is overridden; for "IEN" it selects the IEN-family solver.
TRexGVSSelector$select()
Run the GVS algorithm.
Usage
TRexGVSSelector$select()
TRexGVSSelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexGVSSelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "False Discovery Rate Control for Grouped Variable Selection in High-Dimensional Linear Models Using the T-Knock Filter," in Proc. 30th Eur. Signal Process. Conf. (EUSIPCO), 2022, pp. 892-896.
J. Machkour, M. Muma, and D. P. Palomar, "The Informed Elastic Net for Fast Grouped Variable Selection and FDR Control in Genomics Research," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 466-470.
H. Zou and T. Hastie, "Regularization and Variable Selection via the Elastic Net," J. R. Stat. Soc. Ser. B Stat. Methodol., vol. 67, no. 2, pp. 301-320, 2005.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
sel <- TRexGVSSelector$new(X, y, tFDR = 0.1, verbose = FALSE,
gvs_control = trex_gvs_control(gvs_type = "EN"))
sel$select()
sel$selected_indices
T-Rex Sparse PCA Selector
Description
Extracts sparse principal components under FDR control via
T-Rex variable selection. For each of the M components, ordinary
PCA identifies a PC-response direction, T-Rex selects a sparse active set
at the target FDR, and a sparse loading vector is assembled (ActiveSet or
Thresholded mode). Explained variance is adjusted for non-orthogonality
via QR decomposition.
Active bindings
ZScore matrix (n x M) from last
select()call.VLoading matrix (p x M) from last
select()call.active_setsList of M integer vectors (1-based) from last
select()call.adjusted_evMarginal adjusted explained variance per component (M-vector).
cumulative_evCumulative explained variance percentage (M-vector).
Methods
Public methods
TRexSPCASelector$new()
Create a new TRexSPCASelector.
Usage
TRexSPCASelector$new( X, M, tFDR, control = trex_spca_control(), seed = -1L, verbose = FALSE )
Arguments
XNumeric matrix (n x p), or an
mmap_matrixopened"readwrite". Stored by reference (no copy); centered in place duringselect()and restored on return.MInteger, number of sparse principal components to extract.
tFDRNumeric, target false discovery rate in
(0, 1).controlA control list from
trex_spca_control()(default:trex_spca_control()).seedInteger random seed. Use
-1L(default) for non-deterministic (hardware entropy) behaviour.verboseLogical, whether to print progress (default:
FALSE).
TRexSPCASelector$select()
Run T-Rex Sparse PCA selection.
Usage
TRexSPCASelector$select()
Returns
Invisible self for method chaining. Results accessible
via active fields Z, V, active_sets,
adjusted_ev, cumulative_ev.
TRexSPCASelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexSPCASelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, A. Breloy, M. Muma, D. P. Palomar, and F. Pascal, "Sparse PCA with False Discovery Rate Controlled Variable Selection," in Proc. IEEE 49th Int. Conf. Acoust., Speech, Signal Process. (ICASSP), 2024, pp. 9716-9720.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
set.seed(1)
n <- 100; p <- 30
X <- matrix(rnorm(n * p), n, p)
sel <- TRexSPCASelector$new(X, M = 2, tFDR = 0.2,
control = trex_spca_control(K = 5))
sel$select()
sel$adjusted_ev
sel$active_sets
Screen T-Rex Selector
Description
Fast variable screening algorithm based on TRex architecture.
Super class
TRexSelector -> TRexScreeningSelector
Active bindings
estimated_FDREmpirical FDR expectation bounds.
used_bootstrapEmploys bootstrapping.
confidence_levelBounds the bootstrap estimates.
estimated_correlationCovariance max value.
beta_matComplete variables parameter space.
dummy_betasDummy variables parameter space.
Methods
Public methods
Inherited methods
TRexScreeningSelector$new()
Create a new TRexScreeningSelector object.
Usage
TRexScreeningSelector$new( X, y, seed = -1, verbose = TRUE, screen_control = trex_screen_control(), control = trex_control() )
Arguments
XFeature matrix or MemoryMappedMatrix.
yResponse vector.
seedRandom seed (default: -1).
verboseWhether to print progress (default: TRUE).
screen_controlA screen control list from
trex_screen_control()(default:trex_screen_control()).controlA control list from
trex_control()(default:trex_control()). Thelloop_strategyfield is forced to "STANDARD".
TRexScreeningSelector$select()
Run the Screening algorithm.
Usage
TRexScreeningSelector$select()
TRexScreeningSelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexScreeningSelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "False Discovery Rate Control for Fast Screening of Large-Scale Genomics Biobanks," in Proc. 22nd IEEE Statist. Signal Process. Workshop (SSP), 2023, pp. 666-670.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
sel <- TRexScreeningSelector$new(X, y, verbose = FALSE)
sel$select()
sel$selected_indices
T-Rex Selector
Description
FDR-controlled variable selection algorithm.
Active bindings
.ptrGet internal pointer.
.ptr_Xinternal proxy for data size
selected_varLogical vector indicating which variables were selected.
selected_indicesInteger vector of selected 1-based indices.
v_threshThe chosen voting threshold.
T_stopStopping time: the number of included dummies at which the T-loop stopped.
LCalibrated dummy multiplier L (the selector uses L * p dummies).
voting_gridVoting levels 0.5, 0.5 + 1/K, ..., 1 - eps that the selection searches.
fdp_hat_matEstimated false discovery proportion per T step (rows) and voting level (columns).
phi_matRelative occurrences of the original variables over the K random experiments after each T step (rows).
r_matNumber of selected variables per T step (rows) and voting level (columns).
phi_primeCalibrated relative occurrences used by the FDP estimate (length p), at most 1 and possibly negative.
x_meanscomputed means of the predictor variables
x_l2_normscomputed L2 norms of the scaled predictors
y_meancomputed mean of the response sequence
tFDRThe target FDR level.
KThe number of random experiments.
max_num_dummiesThe maximum dummy multiplier of the L-loop.
max_T_stopWhether the maximum T_stop rule is active.
stagnation_checkWhether the stagnation check is active.
num_selectedThe number of selected variables.
num_dummiesThe number of dummies used by the last select() (the L-loop's calibration).
Methods
Public methods
TRexSelector$new()
Create a new TRexSelector object.
Usage
TRexSelector$new( X, y, tFDR = 0.1, seed = -1, verbose = TRUE, control = trex_control() )
Arguments
XFeature matrix or MemoryMappedMatrix.
yResponse vector.
tFDRTarget FDR level (default: 0.1).
seedRandom seed (default: -1).
verboseWhether to print progress (default: TRUE).
controlA control list from
trex_control()(default:trex_control()).
TRexSelector$restore()
Give X back before select(): undo the
in-place normalization applied at construction and release the
buffer claim (idempotent; a no-op after select(), which
restores X itself). A restored selector cannot run:
select() then errors, construct a new one. Without it, an
unselected selector gives X back only when it is
garbage-collected.
Usage
TRexSelector$restore()
Returns
Invisibly returns self.
TRexSelector$select()
Run the TRexSelector algorithm.
Usage
TRexSelector$select()
Returns
invisible(self)
TRexSelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexSelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
sel <- TRexSelector$new(X, y, tFDR = 0.1, verbose = FALSE)
sel$select()
sel$selected_indices
T-Rex Selector with a general Tikhonov penalty
Description
FDR-controlled variable selection with a Tikhonov penalty
matrix K = t(Gamma) %*% Gamma driving the Tikhonov-net solvers
(TCDTIKNET by default, or TIKNET). K = I collapses to
the plain elastic net; a group-mean K reproduces the GVS-IEN penalty;
banded / Laplacian K encode smoothness-informed selection;
penalty_structure = "GROUP_CENTERING" builds the centering
penalty from the dummy clustering. lambda_2 comes from the caller, a
CV tuner, or the pilot rule (see trex_tikhonov_control).
Dummies are cluster-aware and FOLDED-coupled by default.
Super class
TRexSelector -> TRexTikhonovSelector
Active bindings
lambda2_usedThe lambda_2 actually used by the last
select()run (user-supplied or CV-resolved; solver scale).-1beforeselect().lambda2_cv_diagnosticsHealth record of the lambda_2 tuner of the last
select(): a list withran(a tuner or the pilot ran),seconds,n_profile_at_edge(lambda_2 values whose profiled lambda_1 optimum sat on a truncation edge; 0 is healthy),support_cap(-1 = disabled),dfmax_ratio(IEN tuner: thecv_dfmax_ratioit was called with; 0 otherwise),low_dimensional, and the boundary-pick guard fieldsgrid_index/grid_size,at_grid_edge,profile_at_edge,profile_at_support_capandboundary_pick(seeTRexGVSSelector; the CV methods warn once on a boundary pick and return it unchanged; the pilot rule leaves them at their defaults).lambda2_pilotRecord of the lambda_2 pilot rule of the last
select()(ran == FALSEwhen no pilot ran): thegrid, thecountsthe pick was read off, the per-grid-point curves over the pilot stopping times (curve_majority,curve_soft; G x T matrices), thecalibratedandgroup_majoritycounts, the 1-basedindexof the pick, the pickedlambda2,max_selected,n_ties, the boundary flagsat_lower_end/at_upper_end(widen the grid before trusting a boundary pick), the budget actually used (K_pilot,T_pilot,L_0) and the timings.
Methods
Public methods
Inherited methods
TRexTikhonovSelector$new()
Create a new TRexTikhonovSelector object.
Usage
TRexTikhonovSelector$new( X, y, tFDR = 0.1, seed = -1, verbose = TRUE, tik_control, control = trex_control() )
Arguments
XFeature matrix or MemoryMappedMatrix.
yResponse vector.
tFDRTarget FDR level (default: 0.1).
seedRandom seed (default: -1).
verboseWhether to print progress (default: TRUE).
tik_controlA Tikhonov control list from
trex_tikhonov_control()(required — it carries the penalty matrix K).controlA control list from
trex_control()(default:trex_control()). Thesolverfield selects the Tikhonov-family solver:"TCDTIKNET"(default; the neutraltrex_control()default"TLARS"maps to it), or"TIKNET"(native pathwise); any other value warns and falls back to"TCDTIKNET".
TRexTikhonovSelector$select()
Run the Tikhonov T-Rex algorithm.
Usage
TRexTikhonovSelector$select()
TRexTikhonovSelector$clone()
The objects of this class are cloneable with this method.
Usage
TRexTikhonovSelector$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
A. N. Tikhonov, "Solution of Incorrectly Formulated Problems and the Regularization Method," Soviet Math. Dokl., vol. 4, pp. 1035-1038, 1963 (English translation of Dokl. Akad. Nauk SSSR 151 (1963), no. 3, 501-504).
Y. Park, L. Reichel, G. Rodriguez, and X. Yu, "Parameter Determination for Tikhonov Regularization Problems in General Form," J. Comput. Appl. Math., vol. 343, pp. 12-25, 2018, doi: 10.1016/j.cam.2018.04.049.
A. J. Smola and R. Kondor, "Kernels and Regularization on Graphs," in Learning Theory and Kernel Machines (COLT/Kernel 2003), Lecture Notes in Artificial Intelligence vol. 2777, 2003, pp. 144-158.
F. R. K. Chung, Spectral Graph Theory. CBMS Regional Conference Series in Mathematics, no. 92. American Mathematical Society, 1997.
A. E. Hoerl and R. W. Kennard, "Ridge Regression: Biased Estimation for Nonorthogonal Problems," Technometrics, vol. 42, no. 1, pp. 80-86, 2000 (Reprint of the 1970 article in the Special 40th Anniversary Issue).
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
ctrl <- trex_tikhonov_control(tikhonov_K = diag(ncol(X)), lambda_2 = 0.5,
cluster_dummies = FALSE,
fold_dummy_coupling = FALSE)
sel <- TRexTikhonovSelector$new(X, y, tFDR = 0.1, verbose = FALSE,
tik_control = ctrl)
sel$select()
sel$selected_indices
T-Stagewise Solver
Description
Terminating Stagewise Regression solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TSTAGEWISE_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TSTAGEWISE_Solver$new()
Create a new TSTAGEWISE_Solver.
Usage
TSTAGEWISE_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TSTAGEWISE_Solver$get_num_removals()
Get the number of coefficient removals.
Usage
TSTAGEWISE_Solver$get_num_removals()
Returns
Integer count of removals.
TSTAGEWISE_Solver$get_cycling_ratio()
Get the cycling ratio (removals / total steps).
Usage
TSTAGEWISE_Solver$get_cycling_ratio()
Returns
Scalar numeric cycling ratio.
TSTAGEWISE_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TSTAGEWISE_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TSTAGEWISE_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TSTAGEWISE_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
T. Hastie, J. Taylor, R. Tibshirani, and G. Walther, "Forward Stagewise Regression and the Monotone Lasso," Electron. J. Stat., vol. 1, pp. 1-29, 2007, doi: 10.1214/07-EJS004.
R. J. Tibshirani, "A General Framework for Fast Stagewise Algorithms," J. Mach. Learn. Res., vol. 16, pp. 2543-2588, 2015.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTEPWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TSTAGEWISE_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
T-Stepwise Solver
Description
Terminating Forward Stepwise Regression solver.
Inherits all common methods from TSolver_Base.
Super class
TSolver_Base -> TSTEPWISE_Solver
Methods
Public methods
Inherited methods
TSolver_Base$clear_warnings()TSolver_Base$execute_step()TSolver_Base$get_actions()TSolver_Base$get_active_dummy_indices()TSolver_Base$get_active_predictor_indices()TSolver_Base$get_actives()TSolver_Base$get_beta()TSolver_Base$get_beta_path()TSolver_Base$get_cp()TSolver_Base$get_cp_with_sigma()TSolver_Base$get_dof()TSolver_Base$get_dropped_indices()TSolver_Base$get_dummy_start_index()TSolver_Base$get_inactives()TSolver_Base$get_intercept()TSolver_Base$get_memory_bytes()TSolver_Base$get_num_actives()TSolver_Base$get_num_steps()TSolver_Base$get_num_threads()TSolver_Base$get_r2()TSolver_Base$get_residuals()TSolver_Base$get_rss()TSolver_Base$get_warnings()TSolver_Base$is_connected()TSolver_Base$load()TSolver_Base$restore()TSolver_Base$save()TSolver_Base$set_exchangeable_tie()TSolver_Base$set_num_threads()TSolver_Base$set_tie_seed()TSolver_Base$set_tolerance()TSolver_Base$solver_type_to_string()
TSTEPWISE_Solver$new()
Create a new TSTEPWISE_Solver.
Usage
TSTEPWISE_Solver$new(X, D, y, options = tsolver_options())
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
optionsSolver options from
tsolver_options(default:tsolver_options()).
TSTEPWISE_Solver$get_lambda()
Get the regularization (lambda) path.
Usage
TSTEPWISE_Solver$get_lambda()
Returns
Numeric vector of lambda values, one per step.
TSTEPWISE_Solver$clone()
The objects of this class are cloneable with this method.
Usage
TSTEPWISE_Solver$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
References
B. Efron, T. Hastie, I. Johnstone, and R. Tibshirani, "Least Angle Regression," Ann. Statist., vol. 32, no. 2, pp. 407-499, 2004.
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
tsolver_options()
Examples
set.seed(1)
n <- 20; p <- 5
X <- matrix(rnorm(n * p), n, p)
D <- matrix(rnorm(n * p), n, p)
y <- X[, 1] * 2 + rnorm(n)
solver <- TSTEPWISE_Solver$new(X, D, y)
solver$execute_step(T_stop = 3)
solver$get_beta()
Base T-Solver Class
Description
Abstract base class for all T-Solver R6 wrappers. Provides the common solver
API backed by a Cpp TSolver_Base instance. Users should instantiate one
of the concrete subclasses (TLARS_Solver, TLASSO_Solver, etc.)
rather than this class directly.
In-place preprocessing (the writer/reader contract)
The solver works on the caller's memory without copying: the R matrices
X and D (double storage; an integer matrix is coerced first,
which is a copy) or the memory-mapped file behind an mmap_matrix.
With normalize = TRUE or intercept = TRUE in
tsolver_options the solver is a writer: it centers /
scales the columns of X and D in place (the change is
visible on the caller's matrix), keeps the statistics itself, and holds a
claim on both until $restore() or garbage collection, both of which
write X and D back ($restore() is idempotent and the
fitted path stays available); constructing a second writer (T-solver or
T-Rex selector) on a claimed matrix is an error, because a second
in-place transformation moves the data by rounding. With both
FALSE the solver is a reader: it runs as constructed and
never writes. A pipeline with several solvers on one matrix pre-scales
once in front (MLLpNormScaler) and constructs readers. $load()
expects X and D in the state they were saved in: load into
a reader on pre-scaled data, or into a writer constructed with the same
options on the same data (it keeps the duty to write back). y is
never written (the solver centers an internal copy).
Public fields
XNumeric matrix of predictors, or an
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
ptrExternal pointer to the underlying Cpp
TSolver_Baseobject.
Methods
Public methods
TSolver_Base$new()
Validate and store data fields. Called by every subclass initialize.
Not intended for direct instantiation. The stored X and D
are the matrices the C++ solver maps (no copy for double storage).
Usage
TSolver_Base$new(X, D, y)
Arguments
XNumeric matrix of predictors, or
mmap_matrix.DNumeric matrix of dummies.
yNumeric response vector.
TSolver_Base$execute_step()
Execute solver step.
Usage
TSolver_Base$execute_step(T_stop = -1, early_stop = TRUE)
Arguments
T_stopInteger stopping criterion;
-1runs until the early-stop condition is met.early_stopLogical; stop early when enough dummies are active.
Returns
Invisibly returns self for method chaining.
TSolver_Base$get_num_steps()
Get the number of steps executed so far.
Usage
TSolver_Base$get_num_steps()
Returns
Integer number of completed steps.
TSolver_Base$get_memory_bytes()
Heap bytes the solver holds: its copy of y, the
residual, correlations, Cholesky factor, coefficient path,
diagnostics and reserved capacity (the C++ memoryBytes()).
X and D are borrowed and not counted, nor are the
temporaries inside a step, so the peak of a step is higher.
Usage
TSolver_Base$get_memory_bytes()
Returns
Numeric (double) byte count.
TSolver_Base$get_actions()
Get the action path (variable additions and removals per
step). The C++ solver already records the R lars convention:
1-based signed codes, +j for the addition and -j for the
removal of variable j (dummies continue after the predictors).
Usage
TSolver_Base$get_actions(r_index = TRUE)
Arguments
r_indexLogical; if
TRUE(default) the 1-based signed codes are returned as recorded. IfFALSEthe 0-based indices of the variables acted on are returned (abs(a) - 1); the sign is dropped there because a 0-based signed code cannot distinguish the addition from the removal of the first variable.
Returns
A list of integer vectors, one per step.
TSolver_Base$get_beta()
Get coefficient vector at a given step.
Usage
TSolver_Base$get_beta(step = -1)
Arguments
stepInteger step index;
-1returns the current/final step.
Returns
Numeric vector of coefficients.
TSolver_Base$get_cp()
Get Mallows Cp scores along the solution path.
Usage
TSolver_Base$get_cp()
Returns
Numeric vector of Cp scores, one per step.
TSolver_Base$get_rss()
Get residual sum of squares along the solution path.
Usage
TSolver_Base$get_rss()
Returns
Numeric vector of RSS values, one per step.
TSolver_Base$get_r2()
Get R-squared values along the solution path.
Usage
TSolver_Base$get_r2()
Returns
Numeric vector of R-squared values, one per step.
TSolver_Base$get_dof()
Get degrees of freedom along the solution path.
Usage
TSolver_Base$get_dof()
Returns
Numeric vector of degrees of freedom, one per step.
TSolver_Base$get_actives()
Get currently active variable indices.
Usage
TSolver_Base$get_actives(r_index = TRUE)
Arguments
r_indexLogical; if
TRUE(default) indices are 1-based (R convention); ifFALSEthey are 0-based (Cpp convention).
Returns
Integer vector of active variable indices.
TSolver_Base$get_inactives()
Get currently inactive variable indices.
Usage
TSolver_Base$get_inactives(r_index = TRUE)
Arguments
r_indexLogical; if
TRUE(default) indices are 1-based (R convention); ifFALSEthey are 0-based (Cpp convention).
Returns
Integer vector of inactive variable indices.
TSolver_Base$get_intercept()
Get the fitted intercept at a given step.
Usage
TSolver_Base$get_intercept(step = -1)
Arguments
stepInteger step index;
-1returns the current/final step.
Returns
Scalar numeric intercept.
TSolver_Base$save()
Serialize the solver state to a binary file.
Usage
TSolver_Base$save(filename)
Arguments
filenameCharacter; path to the output file.
Returns
Invisibly returns self.
TSolver_Base$load()
Restore the solver state from a binary file created by
$save(). The loaded solver expects X and D in
the state they were saved in and is a reader (it never writes).
Usage
TSolver_Base$load(filename)
Arguments
filenameCharacter; path to the input file.
Returns
Invisibly returns self.
TSolver_Base$get_residuals()
Residual vector at the current step.
Usage
TSolver_Base$get_residuals()
Returns
Numeric vector of length n.
TSolver_Base$get_beta_path()
Coefficient path: one column per step including the
all-zero start (column 1), predictors first, dummies from
get_dummy_start_index() on; the same layout as Python's
getBetaPath().
Usage
TSolver_Base$get_beta_path()
Returns
Numeric matrix ((p + num_dummies) x (steps + 1)).
TSolver_Base$get_cp_with_sigma()
Mallows' Cp along the path with a supplied noise variance.
Usage
TSolver_Base$get_cp_with_sigma(sigma_hat_sq)
Arguments
sigma_hat_sqPositive numeric, the noise variance estimate.
Returns
Numeric vector, one per step.
TSolver_Base$solver_type_to_string()
Name of the underlying solver type (e.g. "TLARS").
Usage
TSolver_Base$solver_type_to_string()
Returns
Character scalar.
TSolver_Base$get_dropped_indices()
Variables dropped during the path (1-based, predictors and dummies alike).
Usage
TSolver_Base$get_dropped_indices()
Returns
Integer vector.
TSolver_Base$get_active_predictor_indices()
Active predictor indices (1-based, dummies excluded).
Usage
TSolver_Base$get_active_predictor_indices()
Returns
Integer vector.
TSolver_Base$get_active_dummy_indices()
Active dummy indices (1-based within the dummy block).
Usage
TSolver_Base$get_active_dummy_indices()
Returns
Integer vector.
TSolver_Base$get_num_actives()
Number of active variables (predictors and dummies).
Usage
TSolver_Base$get_num_actives()
Returns
Integer.
TSolver_Base$get_dummy_start_index()
1-based column at which the dummies start in the merged
(predictors, dummies) index space, i.e. p + 1.
Usage
TSolver_Base$get_dummy_start_index()
Returns
Integer.
TSolver_Base$is_connected()
Whether the solver is connected to its data views.
Usage
TSolver_Base$is_connected()
Returns
Logical.
TSolver_Base$set_tolerance()
Set the numerical tolerance of the internal comparisons.
Usage
TSolver_Base$set_tolerance(tol)
Arguments
tolPositive numeric.
Returns
Invisibly returns self.
TSolver_Base$set_tie_seed()
Seed the tie-break engine.
Usage
TSolver_Base$set_tie_seed(seed)
Arguments
seedNon-negative integer.
Returns
Invisibly returns self.
TSolver_Base$set_num_threads()
Set the thread budget of the solver's own passes over the
design (tsolver_options(n_threads = )): 1 serial, at least 1.
Usage
TSolver_Base$set_num_threads(n_threads)
Arguments
n_threadsNon-negative integer.
Returns
Invisibly returns self.
TSolver_Base$get_num_threads()
The resolved thread budget of the solver's own passes.
Usage
TSolver_Base$get_num_threads()
Returns
Integer, at least 1.
TSolver_Base$set_exchangeable_tie()
Exchangeable-tie band for the greedy solvers (TOMP / TAFS
families); alpha <= 0 turns it off.
Usage
TSolver_Base$set_exchangeable_tie(alpha, floor = 0.5)
Arguments
alphaBand width in units of the ranking-noise sd.
floorMinimum |correlation| of a tie candidate (default 0.5).
Returns
Invisibly returns self.
TSolver_Base$get_warnings()
Warnings recorded by the solver (dropped columns, the already-preprocessed input, collinear rejections, ...).
Usage
TSolver_Base$get_warnings()
Returns
Character vector.
TSolver_Base$clear_warnings()
Clear the recorded warnings.
Usage
TSolver_Base$clear_warnings()
Returns
Invisibly returns self.
TSolver_Base$restore()
Undo the in-place centering / scaling a writer solver
applied to X and D at construction and release its
claim on them, so that another writer may take the matrices. The
solver's fitted path stays available. y is not modified. No-op
for a reader (normalize = FALSE, intercept = FALSE).
Usage
TSolver_Base$restore()
Returns
Invisibly returns self.
TSolver_Base$clone()
The objects of this class are cloneable with this method.
Usage
TSolver_Base$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
# TSolver_Base is abstract; use a concrete subclass instead, e.g.:
# solver <- TLARS_Solver$new(X, D, y)
Extract or assign blocks in an mmap_matrix
Description
Extract or assign blocks in an mmap_matrix
Usage
## S3 method for class 'mmap_matrix'
x[i, j, ..., drop = FALSE]
Arguments
x |
mmap_matrix object |
i |
row indices |
j |
column indices |
... |
unused arguments |
drop |
logical. If TRUE the result is coerced to the lowest possible dimension (not supported). |
Value
For extraction: a matrix block. For assignment: x invisibly.
See Also
Other memory-mapped matrices:
as.matrix.mmap_matrix(),
dim.mmap_matrix(),
mem_matrix(),
mem_matrix_from(),
print.mmap_matrix()
Examples
mat <- matrix(as.double(1:20), nrow = 4, ncol = 5)
f <- tempfile(fileext = ".bin")
on.exit(unlink(f), add = TRUE)
mem_matrix_from(mat, f)
mm <- mem_matrix(f, rows = 4, cols = 5)
mm[1:2, 1:3]
mm[2, 3] <- 99.0
mm[1:2, 1:3] <- matrix(as.double(1:6), nrow = 2, ncol = 3)
Get Zero-Copy View as Numeric Vector (Block)
Description
Get Zero-Copy View as Numeric Vector (Block)
Usage
## S3 method for class 'mmap_matrix'
as.matrix(x, ...)
Arguments
x |
mmap_matrix object |
... |
extra arguments including row_range and col_range |
Value
Numeric matrix (copied)
See Also
Other memory-mapped matrices:
[.mmap_matrix(),
dim.mmap_matrix(),
mem_matrix(),
mem_matrix_from(),
print.mmap_matrix()
Examples
mat <- matrix(as.double(1:20), nrow = 4, ncol = 5)
f <- tempfile(fileext = ".bin")
on.exit(unlink(f), add = TRUE)
mem_matrix_from(mat, f)
mm <- mem_matrix(f, rows = 4, cols = 5)
as.matrix(mm)
Get mmap_matrix dimensions
Description
Get mmap_matrix dimensions
Usage
## S3 method for class 'mmap_matrix'
dim(x)
Arguments
x |
mmap_matrix object |
Value
an integer vector of length 2
See Also
Other memory-mapped matrices:
[.mmap_matrix(),
as.matrix.mmap_matrix(),
mem_matrix(),
mem_matrix_from(),
print.mmap_matrix()
Examples
mat <- matrix(as.double(1:20), nrow = 4, ncol = 5)
f <- tempfile(fileext = ".bin")
on.exit(unlink(f), add = TRUE)
mem_matrix_from(mat, f)
mm <- mem_matrix(f, rows = 4, cols = 5)
dim(mm)
Memory-Mapped Matrix Object
Description
S3 object wrapping an external pointer to a Cpp MemoryMappedMatrix.
Usage
mem_matrix(filename, rows, cols, mode = "readwrite")
Arguments
filename |
Path to binary mmap file |
rows |
Number of rows |
cols |
Number of columns |
mode |
Access mode: 'readonly' or 'readwrite' (default) |
Value
Object of classes MemoryMappedMatrix and mmap_matrix (S3 XPtr wrapper)
References
F. Scheidt, J. Machkour, and M. Muma, "Solving FDR-Controlled Sparse Regression Problems with Five Million Variables on a Laptop," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 116-120.
See Also
Other memory-mapped matrices:
[.mmap_matrix(),
as.matrix.mmap_matrix(),
dim.mmap_matrix(),
mem_matrix_from(),
print.mmap_matrix()
Examples
mat <- matrix(as.double(1:20), nrow = 4, ncol = 5)
f <- tempfile(fileext = ".bin")
on.exit(unlink(f), add = TRUE)
mem_matrix_from(mat, f)
mm <- mem_matrix(f, rows = 4, cols = 5)
Convert R Matrix to System Memory Mapped Matrix
Description
Writes a numeric matrix to a binary memory-mapped file on disk and returns
a MemoryMappedMatrix handle pointing to it.
Usage
mem_matrix_from(mat, filename)
Arguments
mat |
A |
filename |
String destination file path. |
Value
A MemoryMappedMatrix / mmap_matrix object backed by filename.
References
F. Scheidt, J. Machkour, and M. Muma, "Solving FDR-Controlled Sparse Regression Problems with Five Million Variables on a Laptop," in Proc. IEEE 9th Int. Workshop Comput. Adv. Multi-Sensor Adapt. Process. (CAMSAP), 2023, pp. 116-120.
See Also
Other memory-mapped matrices:
[.mmap_matrix(),
as.matrix.mmap_matrix(),
dim.mmap_matrix(),
mem_matrix(),
print.mmap_matrix()
Examples
mat <- matrix(as.double(1:20), nrow = 4, ncol = 5)
f <- tempfile(fileext = ".bin")
on.exit(unlink(f), add = TRUE)
mm <- mem_matrix_from(mat, f)
print(mm)
Agglomerative Clustering
Description
Performs hierarchical agglomerative clustering on a numeric matrix.
Usage
ml_agglomerative_cluster(
data,
method = ml_linkage_method$Ward,
metric = ml_distance_metric$Euclidean,
use_mmap = FALSE,
verbose = FALSE,
n_threads = NULL
)
Arguments
data |
A numeric matrix, or an |
method |
A value from |
metric |
A value from |
use_mmap |
Whether to use memory mapping files for intermediate storage. Default is FALSE.
Ignored when |
verbose |
Whether the backend prints its allocation line (the size of the distance matrix in RAM or in the memory-mapped file). Default is FALSE. |
n_threads |
Integer, the thread budget of the distance loops ( |
Value
A numeric matrix representing the computed hierarchical linkage.
References
R. Sibson, "SLINK: An Optimally Efficient Algorithm for the Single-Link Cluster Method," Comput. J., vol. 16, no. 1, pp. 30-34, 1973.
J.-P. Benzécri, "Construction d'une classification ascendante hiérarchique par la recherche en chaîne des voisins réciproques," Les Cahiers de l'Analyse des Données, vol. 7, no. 2, pp. 209-218, 1982.
J. Juan, "Programme de classification hiérarchique par l'algorithme de la recherche en chaîne des voisins réciproques," Les Cahiers de l'Analyse des Données, vol. 7, no. 2, pp. 219-225, 1982.
G. N. Lance and W. T. Williams, "A General Theory of Classificatory Sorting Strategies: I. Hierarchical Systems," Comput. J., vol. 9, pp. 373-380, 1967.
D. Müllner, "Modern Hierarchical, Agglomerative Clustering Algorithms," arXiv:1109.2378, 2011.
F. Murtagh and P. Contreras, "Algorithms for Hierarchical Clustering: An Overview," Wiley Interdiscip. Rev. Data Min. Knowl. Discov., vol. 2, no. 1, pp. 86-97, 2012, doi: 10.1002/widm.53.
F. Murtagh and P. Contreras, "Algorithms for Hierarchical Clustering: An Overview, II," Wiley Interdiscip. Rev. Data Min. Knowl. Discov., vol. 7, no. 6, Art. no. e1219, 2017, doi: 10.1002/widm.1219.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_cut_tree(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
data <- matrix(rnorm(30), nrow = 10)
ml_agglomerative_cluster(data, method = ml_linkage_method$Ward)
Cut Hierarchical Linkage Matrix
Description
Flatten the dendrogram clustering results based on the number of requested groups.
Usage
ml_cut_tree(linkage, num_orig_objs, num_clusters)
Arguments
linkage |
A numeric matrix representing linkage, generated by |
num_orig_objs |
Original number of observations data rows. |
num_clusters |
Target flat group capacity. |
Value
An integer vector mapping observation indexes to cluster arrays.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_distance_metric,
ml_linkage_method
Examples
set.seed(1)
data <- matrix(rnorm(30), nrow = 10)
linkage <- ml_agglomerative_cluster(data, method = ml_linkage_method$Ward)
ml_cut_tree(linkage, num_orig_objs = 10, num_clusters = 3)
Distance Metrics
Description
Enumeration of supported distance metrics for hierarchical clustering.
Supported metrics include:
- Euclidean: Standard Euclidean distance: codes as 0.
- Correlation: Correlation distance (1 - correlation): codes as 1.
- Manhattan: Manhattan (L1) distance: codes as 2.
- Correlation_LSH_Filter: Correlation distance with LSH-based filtering: codes as 3.
- Correlation_LSH_Approx: Approximate correlation distance using LSH: codes as 4.
Usage
ml_distance_metric
References
M. S. Charikar, "Similarity Estimation Techniques from Rounding Algorithms," in Proc. ACM Symp. Theory Comput. (STOC), 2002.
P. Indyk and R. Motwani, "Approximate Nearest Neighbors: Towards Removing the Curse of Dimensionality," in Proc. 30th ACM Symp. Theory Comput. (STOC), 1998, pp. 604-613.
P. Li, T. J. Hastie, and K. W. Church, "Very Sparse Random Projections," in Proc. ACM SIGKDD Int. Conf. Knowl. Discovery Data Mining (KDD), 2006.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_linkage_method
Examples
ml_distance_metric$Euclidean
ml_distance_metric$Correlation
Linkage Methods
Description
Enumeration of supported hierarchical clustering linkage methods.
Supported methods include:
- Ward: Ward's minimum variance method: codes as 0.
- Average (UPGMA): Average linkage: codes as 1.
- Complete: Complete linkage: codes as 2.
- Single: Single linkage: codes as 3.
- WPGMA: Weighted pair group method with arithmetic mean: codes as 4.
- Median: Median linkage: codes as 5.
- Centroid: Centroid linkage: codes as 6.
Usage
ml_linkage_method
References
G. N. Lance and W. T. Williams, "A General Theory of Classificatory Sorting Strategies: I. Hierarchical Systems," Comput. J., vol. 9, pp. 373-380, 1967.
D. Müllner, "Modern Hierarchical, Agglomerative Clustering Algorithms," arXiv:1109.2378, 2011.
See Also
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_cut_tree(),
ml_distance_metric
Examples
ml_linkage_method$Ward
ml_linkage_method$Average
Print mmap_matrix
Description
Print mmap_matrix
Usage
## S3 method for class 'mmap_matrix'
print(x, ...)
Arguments
x |
mmap_matrix object |
... |
arguments passed to other methods |
Value
invisibly returns x
See Also
Other memory-mapped matrices:
[.mmap_matrix(),
as.matrix.mmap_matrix(),
dim.mmap_matrix(),
mem_matrix(),
mem_matrix_from()
Examples
mat <- matrix(as.double(1:20), nrow = 4, ncol = 5)
f <- tempfile(fileext = ".bin")
on.exit(unlink(f), add = TRUE)
mem_matrix_from(mat, f)
mm <- mem_matrix(f, rows = 4, cols = 5)
print(mm)
TRex Biobank Control Parameters
Description
Build a control list for the FDR acceptance bounds in
TRexBiobankScreeningSelector. The target FDR level (tFDR) is a separate
top-level parameter of the selector constructor.
Usage
trex_biobank_control(lower_bound_FDR = 0.05, upper_bound_FDR = 0.15)
Arguments
lower_bound_FDR |
Lower bound of the acceptable estimated FDR range (default: 0.05). |
upper_bound_FDR |
Upper bound of the acceptable estimated FDR range (default: 0.15). |
Value
A named list for use in TRexBiobankScreeningSelector.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_control(),
trex_da_control(),
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
trex_biobank_control()
trex_biobank_control(lower_bound_FDR = 0.02, upper_bound_FDR = 0.10)
TRex Control Parameters
Description
Build a control list for TRex selector algorithms.
Usage
trex_control(
solver = "TLARS",
K = 20,
tloop_stagnation_stop = NULL,
tloop_max_stagnant_steps = 5,
parallel_rnd_experiments = FALSE,
use_memory_mapping = FALSE,
max_outer_threads = 1,
max_inner_threads = 1,
max_dummy_multiplier = 10,
use_max_T_stop = TRUE,
opt_threshold = 0.75,
lloop_strategy = "STANDARD",
tol = 1e-06,
lambda2 = 0.1,
rho_afs = 0.3,
ncgmp_variant = 0,
exch_tie_alpha = 0,
exch_tie_floor = 0.5,
tenet_aug_use_lars = FALSE,
cd_lambda_rel_tol = 1e-06,
cd_tol_certify = -1,
cd_tol_probe = -1,
cd_gram_cap = 0,
cd_max_sweeps = 0,
cd_certified_localization = TRUE,
dummy_distribution = trex_dummy_distribution(),
scaling_mode = c("L2", "ZSCORE", "NONE")
)
Arguments
solver |
Solver algorithm: "TLARS", "TLASSO", "TENET", "TENET_AUG",
"TSTAGEWISE", "TSTEPWISE", "TOMP", "TGP", "TACGP", "TMP", "TNCGMP",
"TOOLS", "TAFS", "TCDLASSO", "TCDENET" (default: "TLARS"). "TENET_AUG"
is the row-augmented formulation of the TENET elastic net (proved
equivalent for |
K |
Number of random experiments (default: 20). |
tloop_stagnation_stop |
Whether to stop the T-loop on stagnation. NULL (default) leaves the choice to the C++ core, the same rule on every surface: FALSE for the path solvers (TLARS, TLASSO, TENET, TENET_AUG, TIENET, TIENET_AUG, TIKNET and the CD family TCDLASSO, TCDENET, TCDIENET, TCDTIKNET), TRUE for the greedy ones (the OMP family, TSTEPWISE, TSTAGEWISE, TAFS, TNCGMP, TOOLS). |
tloop_max_stagnant_steps |
Steps before stagnation trigger (default: 5). |
parallel_rnd_experiments |
Run the K random experiments in parallel
(default: |
use_memory_mapping |
Use out-of-core memory mapping (default: FALSE). |
max_outer_threads |
Threads of the parallel K-loop (default: 1; a
whole number of at least 1), capped at |
max_inner_threads |
Thread budget of the solvers' own passes over the design (default: 1, serial; a whole number of at least 1). Live when the experiments run in sequence; inside a parallel run the solvers stay serial. A pass splits only above about a million entries of the design, so small problems run serially whatever the budget. |
max_dummy_multiplier |
Maximum dummy features multiplier (default: 10). |
use_max_T_stop |
Whether to bound max T_stop (default: TRUE). |
opt_threshold |
Optimization threshold (default: 0.75). |
lloop_strategy |
L-loop strategy: "SKIPL", "STANDARD", "HCONCAT", "PERMUTATION", "PERMUTATION_SEEDED", or "SEEDED" (default: "STANDARD", as in C++ and Python). The SEEDED variants re-derive dummies from the seed at every step and store nothing: "SEEDED" is the storage-free twin of "STANDARD" (fresh dummies at every L step, bit-identical to "STANDARD" for the same seed) and "PERMUTATION_SEEDED" the storage-free twin of "PERMUTATION". |
tol |
Tolerance for solver algorithms (default: 1e-6). |
lambda2 |
Elastic-net L2 penalty (TENET hyperparameter, default: 0.1). |
rho_afs |
AFS hyperparameter (default: 0.3). |
ncgmp_variant |
NCGMP variant: 0 = line_search, 1 = fully_corrective (default: 0). |
exch_tie_alpha |
Exchangeable-tie band width for greedy solvers
(TOMP/TAFS), in units of the pairwise ranking-noise sd. When > 0,
statistically indistinguishable top candidates within highly correlated
clusters are picked uniformly at random per step, restoring the
within-experiment occurrence spread that the dependency-aware (DA)
deflation's FDR control relies on. Recommended for greedy solvers under
trex+DA: 0.25. |
exch_tie_floor |
Minimum absolute correlation for exchangeable-tie
candidates, in (0, 1) (default: 0.5). Ignored unless
|
tenet_aug_use_lars |
Logical, for |
cd_lambda_rel_tol |
Relative lambda step tolerance of the CCD family's crossing search (default: 1e-6, as in C++ and Python). Values <= 0 keep the solver's internal default. Ignored by the non-CCD solvers. |
cd_tol_certify |
KKT certification tolerance of the CCD family. Must
be set together with |
cd_tol_probe |
Probing tolerance of the CCD family's coordinate
sweeps. Must be set together with |
cd_gram_cap |
Column cap for the CCD family's cached Gram matrix; above it the solver falls back to the naive updates (default: 0 = keep the solver's internal default). Ignored by the non-CCD solvers. |
cd_max_sweeps |
Maximum coordinate sweeps per CCD subproblem (default: 0 = keep the solver's internal default). Ignored by the non-CCD solvers. |
cd_certified_localization |
Logical (default |
dummy_distribution |
Dummy variable distribution, created with
|
scaling_mode |
Working-design convention, one of |
Value
A named list suitable for passing to TRex selector constructors.
Note
Seed recommendation for Monte Carlo FDR simulations: always pass
seed = -1 (the default) to TRexSelector$new() or any other
selector constructor when running repeated trials. A fixed integer seed
causes every trial to draw K per-experiment dummy seeds as
mix_seed(fixed, 0), mix_seed(fixed, 1), ... — deterministic but
structurally correlated across trials — which can inflate the empirical FDR
in a sweep. With seed = -1 each of the K experiments independently
draws hardware entropy via std::random_device, matching the
behaviour of the standalone C++ demo.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_da_control(),
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
trex_control()
trex_control(solver = "TLASSO", K = 10)
trex_control(scaling_mode = "NONE") # user-managed centering and scaling
TRex DA Control Parameters
Description
Build a control list for the dependency-aware dummy generation in TRexDASelector.
Usage
trex_da_control(
da_method = "BT",
cor_coef = -2,
rho_thr_DA = 0.02,
hc_linkage = "Single",
hc_grid_length = 0,
prior_groups = NULL
)
Arguments
da_method |
Dependency estimation method: "BT", "AR1", "EQUI", "NN"
(default: "BT"). "NN" is a nearest-neighbour correlation-threshold sweep
(BT-style) over a rho grid of length |
cor_coef |
Correlation coefficient for AR1/EQUI. -2.0 triggers auto-estimation (default: -2.0). |
rho_thr_DA |
Threshold below which equi-correlation is skipped (default: 0.02). |
hc_linkage |
Hierarchical clustering linkage: "Single", "Complete", "Average", "WPGMA", "Ward" (default: "Single"). |
hc_grid_length |
Number of grid points for BT/NN calibration. |
prior_groups |
Optional prior grouping constraints: a list of integer
vectors, each of length |
Value
A named list for use in TRexDASelector.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
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
trex_da_control()
trex_da_control(da_method = "BT", hc_linkage = "Average")
# Prior-groups path (constraints over p = 4 variables):
trex_da_control(prior_groups = list(c(1, 1, 2, 2)))
TRex Dummy Variable Distribution
Description
Build a distribution specification for the dummy variables
injected by the T-Rex Selector. Pass the result to the
dummy_distribution argument of trex_control.
Usage
trex_dummy_distribution(
type = "Normal",
a = NULL,
df = NULL,
location = NULL,
scale = NULL,
b = NULL,
c = NULL,
dim = NULL,
s = NULL
)
Arguments
type |
Character string naming the distribution. One of:
|
a |
Scale / upper-bound parameter (used by |
df |
Degrees of freedom (used by |
location |
Location parameter (used by |
scale |
Scale parameter (used by |
b |
Upper vertex of the triangle (used by |
c |
Right boundary of the triangle (used by |
dim |
Dimension of the sphere (used by |
s |
Sparsity parameter (used by |
Value
A named list describing the dummy distribution, for use in
trex_control.
References
J. Machkour, M. Muma, and D. P. Palomar, "The Terminating-Random Experiments Selector: Fast High-Dimensional Variable Selection with False Discovery Rate Control," Signal Process., vol. 231, Art. no. 109894, 2025, doi: 10.1016/j.sigpro.2025.109894.
E. Mammen, "Bootstrap and Wild Bootstrap for High Dimensional Linear Models," Ann. Statist., vol. 21, no. 1, pp. 255-285, 1993, doi: 10.1214/aos/1176349025.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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
# Standard Normal (default)
trex_dummy_distribution()
# Student-t with 3 degrees of freedom
trex_dummy_distribution("StudentT", df = 3)
Compute False Discovery Proportion (FDP) using index sets
Description
Compute False Discovery Proportion (FDP) using index sets
Usage
trex_fdp(selected_indices, true_support)
Arguments
selected_indices |
Integer vector of selected indices. |
true_support |
Integer vector of true active indices. |
Value
Numeric FDP value.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
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
trex_fdp(c(1L, 3L, 5L), c(1L, 2L, 3L))
Compute False Discovery Proportion (FDP) using dense vectors
Description
Compute False Discovery Proportion (FDP) using dense vectors
Usage
trex_fdp_dense(beta_hat, beta, eps = 1e-15)
Arguments
beta_hat |
Numeric vector of estimated coefficients. |
beta |
Numeric vector of true coefficients. |
eps |
Numeric threshold for counting non-zeros (default: 1e-15). |
Value
Numeric FDP value.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
trex_fdp(),
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
trex_fdp_dense(c(1.5, 0, 0.8, 0, 0), c(2.0, 0, 1.0, 0, 0))
Build a Tikhonov penalty matrix K from an operator Gamma
Description
Computes K = t(Gamma) %*% Gamma (pruned and
compressed) for use as tikhonov_K in
trex_tikhonov_control. For example, a first-difference
Gamma yields the smoothness-encoding graph Laplacian of a chain.
Usage
trex_gamma_to_k(gamma)
Arguments
gamma |
Regularization operator (m x p): a base |
Value
A sparse Matrix::dgCMatrix (p x p). Requires the Matrix
package (Suggests) for the sparse return class.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
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
# First-difference operator over 5 variables -> chain Laplacian
if (requireNamespace("Matrix", quietly = TRUE)) {
p <- 5
gamma <- diff(diag(p))
K <- trex_gamma_to_k(gamma)
}
The library's thread budget
Description
The library is single-threaded by default. Every parallel
region of the C++ backend runs on an explicit budget: a selector's
random experiments and its inner kernels on trex_control(
max_outer_threads, max_inner_threads), a T-solver on
tsolver_options(n_threads), and every method without an option
of its own (the scalers, the clustering, the ML regressions, the
dummy and data generators, trex_normalize_design) on the
library's default budget, which starts at 1.
trex_get_num_threads() reads that default budget and
trex_set_num_threads() sets it for this session; the
n_threads argument of those methods overrides it per object.
trex_get_max_threads() reports the threads OpenMP can run on this
machine (1 in a build without OpenMP), an upper bound for a budget.
Usage
trex_get_num_threads()
trex_get_max_threads()
trex_set_num_threads(n)
Arguments
n |
Positive integer, the default thread budget. |
Value
trex_get_num_threads(), trex_get_max_threads(): an
integer. trex_set_num_threads(): invisibly, the previous budget.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
trex_gamma_to_k(),
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
trex_get_num_threads() # 1
old <- trex_set_num_threads(min(2L, trex_get_max_threads()))
trex_get_num_threads()
trex_set_num_threads(old)
TRex GVS Control Parameters
Description
Build a control list for group variable selection augmentation policy in
TRexGVSSelector. The solver is determined automatically from gvs_type:
"EN" selects the T-Elastic-Net solver via en_solver — TENET
(default), with TENET_AUG and TCDENET as optional variants; "IEN" honors
an IEN-family solver field in trex_control —
TIENET (default, native pathwise), with TIENET_AUG and TCDIENET as
optional variants. For gvs_type = "EN" the solver field
is ignored.
Usage
trex_gvs_control(
gvs_type = "EN",
corr_max = 0.5,
hc_linkage = "Single",
lambda_2 = -1,
lambda2_method = NULL,
en_solver = "TENET",
tenet_aug_use_lars = FALSE,
groups = NULL,
cv_n_folds = 10,
cv_n_lambda = 1000,
cv_n_lambda1 = 40,
cv_n_lambda2 = 100,
cv_dfmax_ratio = 0.8,
cv_seed = -1
)
Arguments
gvs_type |
Augmentation policy: "EN" (Elastic Net) or "IEN" (Informed Elastic Net) (default: "EN"). |
corr_max |
Maximum pairwise correlation for automatic cluster formation (default: 0.5). |
hc_linkage |
Hierarchical clustering linkage: "Single", "Complete", "Average", "WPGMA" (default: "Single"). |
lambda_2 |
L2 penalty weight for group structure, in LARS units.
A negative value (default |
lambda2_method |
Auto-determination strategy for |
en_solver |
Elastic Net solver variant for |
tenet_aug_use_lars |
Logical. When |
groups |
Integer vector of manually specified group assignments (1-based, default: NULL). |
cv_n_folds |
Number of folds for the k-fold cross-validation used by the
CV |
cv_n_lambda |
Number of points on the geometric lambda grid searched by
the CV auto-computation of |
cv_n_lambda1 |
IEN-geometry coordinate-descent tuners
( |
cv_n_lambda2 |
IEN-geometry coordinate-descent tuners only: points
on the lambda_2 grid (default: 100). Ignored by the other rules and
when |
cv_dfmax_ratio |
IEN-geometry coordinate-descent tuners only: support
cap as a fraction of the smallest fold's training size; each lambda_1
path stops once more than |
cv_seed |
Seed for the deterministic fold-permutation RNG used by the CV
|
Value
A named list for use in TRexGVSSelector.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
trex_gamma_to_k(),
trex_get_num_threads(),
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
trex_gvs_control()
trex_gvs_control(gvs_type = "IEN", corr_max = 0.3)
Apply the T-Rex data normalization to a design
Description
The selectors' own preprocessing as a user-callable helper:
the same code path a selector runs at construction for the given
scaling_mode. Use it to pre-normalize a design and then run a
selector with trex_control(scaling_mode = "NONE") (the selection
is identical to running the raw design under "L2"), to inspect
the centering and scaling parameters, or to validate a design before a
long run. The inputs are copied and left untouched.
Usage
trex_normalize_design(
X,
y,
scaling_mode = c("L2", "ZSCORE", "NONE"),
eps = 1e-06,
n_threads = NULL
)
Arguments
X |
Numeric design matrix (n x p). |
y |
Numeric response vector (length n). |
scaling_mode |
One of |
eps |
Dead-column threshold on the working L2 norm (default 1e-6, the selectors' default solver tolerance). |
n_threads |
Integer, the thread budget of the column passes
( |
Details
Errors on a non-finite entry or a dead column (constant under
"L2" / "ZSCORE", all-zero under "NONE"), naming
the column (0-based, as reported by the C++ core).
Value
A list with X and y (the normalized copies),
X_means, X_scales (the per-column divisors: L2 norms for
"L2", sample SDs for "ZSCORE", ones for "NONE") and
y_mean.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
trex_gamma_to_k(),
trex_get_num_threads(),
trex_gvs_control(),
trex_precision(),
trex_recall(),
trex_screen_control(),
trex_spca_control(),
trex_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
Examples
set.seed(1)
X <- matrix(rnorm(200), 40, 5)
y <- X[, 1] + rnorm(40)
d <- trex_normalize_design(X, y)
colMeans(d$X) # ~ 0
sqrt(colSums(d$X^2)) # 1
Compute Precision using index sets
Description
Compute Precision using index sets
Usage
trex_precision(selected_indices, true_support)
Arguments
selected_indices |
Integer vector of selected indices. |
true_support |
Integer vector of true active indices. |
Value
Numeric precision value.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
trex_dummy_distribution(),
trex_fdp(),
trex_fdp_dense(),
trex_gamma_to_k(),
trex_get_num_threads(),
trex_gvs_control(),
trex_normalize_design(),
trex_recall(),
trex_screen_control(),
trex_spca_control(),
trex_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
Examples
trex_precision(c(1L, 3L, 5L), c(1L, 2L, 3L))
Compute Recall using index sets
Description
Compute Recall using index sets
Usage
trex_recall(selected_indices, true_support)
Arguments
selected_indices |
Integer vector of selected indices. |
true_support |
Integer vector of true active indices. |
Value
Numeric recall value.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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_screen_control(),
trex_spca_control(),
trex_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
Examples
trex_recall(c(1L, 3L, 5L), c(1L, 2L, 3L))
TRex Screen Control Parameters
Description
Build a control list for the screening step in TRexScreeningSelector and TRexBiobankScreeningSelector.
Usage
trex_screen_control(
use_bootstrap_CI = FALSE,
R_boot = 1000,
ci_grid_step = 0.001,
trex_method = "TREX"
)
Arguments
use_bootstrap_CI |
Whether to use bootstrap confidence intervals for screening (default: FALSE). |
R_boot |
Number of bootstrap iterations (default: 1000). |
ci_grid_step |
Grid step size for confidence-interval calculations (default: 0.001). |
trex_method |
Screening method: "TREX", "TREX_DA_AR1", "TREX_DA_EQUI", "TREX_DA_BLOCK_EQUI" (default: "TREX"). |
Value
A named list for use in TRexScreeningSelector or TRexBiobankScreeningSelector.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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_spca_control(),
trex_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
Examples
trex_screen_control()
trex_screen_control(use_bootstrap_CI = TRUE, R_boot = 500)
T-Rex SPCA Control Parameters
Description
Build a control list for the T-Rex Sparse PCA selector.
Usage
trex_spca_control(
mode = "ActiveSet",
lambda2_ridge_loadings = 1e-06,
gvs_type = "EN",
lambda_2 = -1,
lambda2_method = "CV_1SE_CCD",
en_solver = "TENET_AUG",
tenet_aug_use_lars = FALSE,
K = 20L,
max_dummy_multiplier = 10L
)
Arguments
mode |
Character, sparse loading strategy: |
lambda2_ridge_loadings |
Numeric, Ridge penalty for ActiveSet loading
assembly (default: |
gvs_type |
Character, GVS variant used internally for per-PC variable
selection. Only |
lambda_2 |
Numeric, L2/Elastic Net penalty forwarded to the internal
TRexGVSSelector, in LARS units. A negative value (default |
lambda2_method |
Character, auto-determination strategy for
|
en_solver |
Character, Elastic Net solver variant used internally:
|
tenet_aug_use_lars |
Logical. When |
K |
Integer, number of T-Rex random experiments per PC (default: 20). |
max_dummy_multiplier |
Integer, maximum dummy feature multiplier for T-Rex sub-selection (default: 10). |
Value
A named list for passing to TRexSPCASelector$new().
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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_tikhonov_control(),
trex_tikhonov_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
Examples
trex_spca_control()
trex_spca_control(mode = "Thresholded", K = 10)
trex_spca_control(lambda_2 = 0.01)
TRex Tikhonov Control Parameters
Description
Build a control list for TRexTikhonovSelector,
the general-Tikhonov T-Rex: a penalty matrix
K = t(Gamma) %*% Gamma drives the Tikhonov-net solvers
(TCDTIKNET by default; TIKNET through the solver field
of trex_control). K = I collapses to the plain
elastic net; a group-mean K reproduces the GVS-IEN penalty;
banded/Laplacian K encode smoothness. With
penalty_structure = "GROUP_CENTERING" the selector builds K
itself from the dummy clustering (block-diagonal I - J / p_m:
the members of a group share a coefficient).
Usage
trex_tikhonov_control(
tikhonov_K = NULL,
penalty_structure = "SPARSE_GENERAL",
lambda_2 = -1,
lambda2_method = "PILOT_KNEE",
cv_n_folds = 10,
cv_n_lambda = 100,
cv_n_lambda1 = 40,
cv_n_lambda2 = 100,
cv_dfmax_ratio = 0.8,
cv_seed = -1,
pilot_grid = c(0, 1, 3, 10, 30, 100, 300, 1000, 3000),
pilot_K = 10,
pilot_T = 5,
pilot_L_multiplier = 1,
pilot_knee_tolerance = 1,
pilot_statistic = "MAJORITY",
pilot_group_fraction = 0.5,
pilot_shared_dummies = FALSE,
fold_dummy_coupling = TRUE,
cluster_dummies = TRUE,
prior_groups = NULL,
corr_max = 0.5,
hc_linkage = "Single"
)
Arguments
tikhonov_K |
Penalty matrix K (p x p): a base |
penalty_structure |
|
lambda_2 |
Penalty weight, solver scale. A negative value (default
|
lambda2_method |
Auto-determination strategy when
|
cv_n_folds |
Folds for the CV paths (default: 10). |
cv_n_lambda |
Points on the CV lambda grid of the SVD rules (default: 100). |
cv_n_lambda1 |
IEN-geometry coordinate-descent rules: points on the profiled lambda_1 path per lambda_2 value (default: 40). |
cv_n_lambda2 |
IEN-geometry coordinate-descent rules: points on the lambda_2 grid (default: 100). |
cv_dfmax_ratio |
IEN-geometry coordinate-descent rules: support cap
as a fraction of the smallest fold's training size; each lambda_1 path
stops once more than |
cv_seed |
Seed for the CV fold permutation; |
pilot_grid |
Pilot rule: lambda_2 candidates on the working column
scale (default |
pilot_K |
Pilot rule: pilot experiments per grid point (default:
10; at least 2, capped at |
pilot_T |
Pilot rule: stopping time of the pilot paths (default:
5; at least 1, capped at |
pilot_L_multiplier |
Pilot rule: pilot dummies
|
pilot_knee_tolerance |
Pilot rule: selections below the largest pilot count that still count as "on the plateau" (default: 1; 0 reads the largest count, ties toward the smallest lambda_2). |
pilot_statistic |
Pilot rule, the count the pick is read off:
|
pilot_group_fraction |
|
pilot_shared_dummies |
Logical (default |
fold_dummy_coupling |
Logical (default |
cluster_dummies |
Logical (default |
prior_groups |
Integer vector of 1-based cluster IDs per variable
(length p) for the dummy clustering. |
corr_max |
Maximum cross-cluster |correlation| for the HAC dummy
clustering (default: 0.5). Ignored when |
hc_linkage |
HAC linkage: "Single" (default), "Complete",
"Average", "WPGMA". Ignored under |
Value
A named list for use in TRexTikhonovSelector.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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_lambda2_power_rule(),
trex_tpp(),
trex_tpp_dense()
Examples
trex_tikhonov_control(tikhonov_K = diag(10))
trex_tikhonov_control(penalty_structure = "GROUP_CENTERING",
prior_groups = rep(1:2, each = 5),
pilot_grid = c(0, 1, 10, 100))
trex_tikhonov_control(tikhonov_K = diag(10),
lambda2_method = "CV_1SE_IEN_CCD")
The knee of the full lambda_2 profile of the Tikhonov T-Rex
Description
Runs one FDR-controlled Tikhonov T-Rex selection per value of
grid with the same seed, so the probes share their dummies and
differ by the penalty weight alone, and picks the smallest lambda_2 whose
selection is within knee_tolerance selections of the largest (the
knee of the profile). This is the reference rule behind the default
lambda2_method = "PILOT_KNEE" of
trex_tikhonov_control, which reads the same knee off a few
random experiments per grid value at a fraction of the cost; the full
profile costs one selection per grid value and returns every probe's
selection. The pick depends on y and lies outside the fixed-lambda_2 FDR
guarantee that each probe carries.
Usage
trex_tikhonov_lambda2_power_rule(
X,
y,
tFDR = 0.1,
tik_control,
control = trex_control(),
seed = 0,
grid = c(0, 1, 3, 10, 30, 100, 300, 1000, 3000),
knee_tolerance = 1,
verbose = FALSE
)
Arguments
X |
Feature matrix (n x p). Every probe normalizes it in place and
hands it back, so |
y |
Response vector (length n). |
tFDR |
Target FDR level (default: 0.1). |
tik_control |
A Tikhonov 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 on the solver scale (default
|
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:
|
Value
A list: lambda2 (the pick), index (1-based, into
grid), selected (the 1-based selection at the pick),
grid (ascending, de-duplicated), counts (selection sizes
per grid value), probes (one list per grid value with
lambda2, selected, T_stop and seconds),
max_selected, n_ties (grid values within the tolerance
of the maximum), the boundary flags at_lower_end /
at_upper_end (widen the grid before trusting a boundary pick)
and seconds.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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_tpp(),
trex_tpp_dense()
Examples
data(Gauss_data)
X <- Gauss_data$X
y <- Gauss_data$y
ctrl <- trex_tikhonov_control(tikhonov_K = diag(ncol(X)))
prof <- trex_tikhonov_lambda2_power_rule(X, y, tFDR = 0.1, tik_control = ctrl,
grid = c(0, 1, 10), seed = 1)
prof$lambda2
prof$counts
Compute True Positive Proportion (TPP) using index sets
Description
Compute True Positive Proportion (TPP) using index sets
Usage
trex_tpp(selected_indices, true_support)
Arguments
selected_indices |
Integer vector of selected indices. |
true_support |
Integer vector of true active indices. |
Value
Numeric TPP value.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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_dense()
Examples
trex_tpp(c(1L, 3L, 5L), c(1L, 2L, 3L))
Compute True Positive Proportion (TPP) using dense vectors
Description
Compute True Positive Proportion (TPP) using dense vectors
Usage
trex_tpp_dense(beta_hat, beta, eps = 1e-15)
Arguments
beta_hat |
Numeric vector of estimated coefficients. |
beta |
Numeric vector of true coefficients. |
eps |
Numeric threshold for counting non-zeros (default: 1e-15). |
Value
Numeric TPP value.
See Also
Other T-Rex selectors and controls:
Gauss_data,
TRexBiobankScreeningSelector,
TRexDASelector,
TRexGVSSelector,
TRexSPCASelector,
TRexScreeningSelector,
TRexSelector,
TRexTikhonovSelector,
trex_biobank_control(),
trex_control(),
trex_da_control(),
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()
Examples
trex_tpp_dense(c(1.5, 0, 0.8, 0, 0), c(2.0, 0, 1.0, 0, 0))
T-Solver Options
Description
Every T-solver input except the data X, D and y,
as one list (the C++ SolverOptions). Pass it to a solver's
$new(X, D, y, options = ...). Each solver reads the fields it
needs and ignores the rest; the defaults are the solver-level defaults.
Usage
tsolver_options(
normalize = TRUE,
intercept = TRUE,
precentered = FALSE,
scaling_mode = c("L2", "ZSCORE"),
verbose = FALSE,
tol = .Machine$double.eps,
tie_seed = 0,
n_threads = 1,
exch_tie_alpha = 0,
exch_tie_floor = 0.5,
lambda2 = 0,
rho_afs = 1,
ncgmp_variant = c("line_search", "fully_corrective"),
tenet_aug_use_lars = FALSE,
kappa_dummy = 1,
fold_dummies = FALSE,
group_penalty = c("MEAN", "CENTERING"),
cd_lambda_rel_tol = 0.001,
cd_tol_certify = 1e-10,
cd_tol_probe = 1e-08,
cd_gram_cap = 400,
cd_max_sweeps = 2000,
cd_certified_localization = TRUE
)
Arguments
normalize |
Logical; scale each column of X and D to unit L2 norm (or
unit SD, see |
intercept |
Logical; center X, D and y (an intercept is fitted).
|
precentered |
Logical; the caller centered X, D and y
( |
scaling_mode |
|
verbose |
Logical; print status and diagnostics. Default |
tol |
Numerical tolerance of the solver's internal comparisons. Default: machine epsilon. |
tie_seed |
Seed of the solver's tie-break engine. Default 0: a fixed seed, so a solver run is reproducible also where exact ties occur; a negative value seeds from the system entropy source (nondeterministic). |
n_threads |
Thread budget of the solver's own passes over the design
(the correlation refreshes, the step-length search, the standardization).
Default 1 (serial); a whole number of at least 1. A pass splits only
above about a million entries of the design, and never inside a parallel
region of the caller. The T-Rex selectors set it from
|
exch_tie_alpha |
Exchangeable-tie band width for the greedy solvers (TOMP and TAFS families), in units of the pairwise ranking-noise sd; 0 (default) turns it off. Ignored by the path solvers. |
exch_tie_floor |
Minimum absolute correlation for exchangeable-tie candidates, in [0, 1). Default 0.5. |
lambda2 |
L2 (ridge / group-ridge) penalty weight, >= 0. Read by TENET, TENETAug and TIENETAug. Default 0 (no quadratic penalty: the elastic nets reduce to their lasso). |
rho_afs |
TAFS shrinkage step in (0, 1]; 1 (default) is forward stepwise. |
ncgmp_variant |
TNCGMP variant: |
tenet_aug_use_lars |
Logical; TENETAug and TIENETAug run the
augmented system with a pure-LARS inner path that never drops variables
(default |
kappa_dummy |
Ridge weight of the dummy block of the CCD elastic nets (not bound to R yet). Default 1. |
fold_dummies |
Logical; TCDTIKNET dummy coupling (not bound to R
yet). Default |
group_penalty |
TCDIENET structured penalty, |
cd_lambda_rel_tol, cd_tol_certify, cd_tol_probe, cd_gram_cap, cd_max_sweeps, cd_certified_localization |
Knobs of the CD solver family (not bound to R yet); the defaults are the
solver defaults (1e-3, 1e-10, 1e-8, 400, 2000, |
Value
A named list suitable for the options argument of every
T-solver constructor.
In-place preprocessing (the writer/reader contract)
The T-solvers work on the caller's matrices without copying, in R as in
C++ and Python. With normalize = TRUE or intercept = TRUE a
solver is a writer: it centers / scales the columns of X and D in
place (visible on the caller's matrix or memory-mapped file), keeps the
statistics itself, and holds a claim on both until $restore() or
garbage collection, both of which write X and D back; a second writer
(T-solver or T-Rex selector) on a claimed matrix is an error, because a
second in-place transformation moves the data by rounding. With
normalize = FALSE and intercept = FALSE a solver is a
reader that runs as constructed and never writes; a pipeline with
several solvers on one matrix pre-scales once in front (MLLpNormScaler)
and constructs readers. y is never written. See TSolver_Base.
See Also
Other T-solvers:
TACGP_Solver,
TAFS_Solver,
TCDENET_Solver,
TCDIENET_Solver,
TCDLASSO_Solver,
TCDTIKNET_Solver,
TENETAug_Solver,
TENET_Solver,
TGP_Solver,
TIENETAug_Solver,
TIENET_Solver,
TIKNET_Solver,
TLARS_Solver,
TLASSO_Solver,
TMP_Solver,
TNCGMP_Solver,
TOMP_Solver,
TOOLS_Solver,
TSTAGEWISE_Solver,
TSTEPWISE_Solver
Examples
tsolver_options()
tsolver_options(lambda2 = 0.5, normalize = FALSE)