These helpers expose the individual stages of the SelectBoost workflow so
that beta-regression selectors can be combined with correlation-aware
resampling directly from SelectBoost.beta. They normalise the design matrix,
derive correlation structures, form groups of correlated predictors, generate
Gaussian surrogates that mimic the observed dependency structure, and apply a
user-provided selector on each resampled design.
sb_normalize(X, center = NULL, scale = NULL, eps = 1e-08)sb_compute_corr(X, corrfunc = "cor")
sb_group_variables(corr_mat, c0)
sb_normalize() returns a centred, \(\ell_2\)-scaled copy of X.
sb_compute_corr() returns the association matrix.
sb_group_variables() returns a list of integer vectors, one per
variable, describing the correlated group it belongs to.
Numeric matrix of predictors.
Optional centering vector recycled to the number of columns.
Defaults to the column means of X.
Optional scaling vector recycled to the number of columns. Defaults to the column-wise \(\ell_2\) norms of the centred matrix.
Small positive constant used when normalising columns.
Function or character string used to compute pairwise
associations. Defaults to "cor".
Numeric matrix of associations.
Threshold applied to the absolute correlations.
sb_normalize(matrix(rnorm(20), 5))
Run the code above in your browser using DataLab