Solves group elastic net via covariance method.
gaussian_cov(
A,
v,
constraints = NULL,
groups = NULL,
alpha = 1,
penalty = NULL,
lmda_path = NULL,
max_iters = as.integer(1e+05),
tol = 1e-07,
rdev_tol = 0.001,
newton_tol = 1e-12,
newton_max_iters = 1000,
n_threads = 1,
early_exit = TRUE,
screen_rule = "pivot",
min_ratio = 0.01,
lmda_path_size = 100,
max_screen_size = NULL,
max_active_size = NULL,
pivot_subset_ratio = 0.1,
pivot_subset_min = 1,
pivot_slack_ratio = 1.25,
check_state = FALSE,
progress_bar = FALSE,
warm_start = NULL
)
State of the solver.
Positive semi-definite matrix.
Linear term.
Constraints.
Groups.
Elastic net parameter.
Penalty factor.
The regularization path.
Maximum number of coordinate descents.
Coordinate descent convergence tolerance.
Relative percent deviance explained tolerance.
Convergence tolerance for the BCD update.
Maximum number of iterations for the BCD update.
Number of threads.
TRUE
if the function should exit early.
Screen rule (currently the only value is the default "pivot"
.
Ratio between largest and smallest regularization parameter, default is 0.01
.
Number of regularization steps in the path, default is 100
.
Maximum number of screen groups, default is NULL
for no maximum.
Maximum number of active groups, default is NULL
for no maximum.
Subset ratio of pivot rule, default is 0.1
.
Minimum subset of pivot rule, default is 1
.
Slack ratio of pivot rule, default is 1.25
.
Check state, default is FALSE
.
Progress bar, default is FALSE
.
Warm start, default is NULL
(no warm start).
set.seed(0)
n <- 100
p <- 200
X <- matrix(rnorm(n * p), n, p)
y <- X[,1] * rnorm(1) + rnorm(n)
A <- t(X) %*% X / n
v <- t(X) %*% y / n
state <- gaussian_cov(A, v)
Run the code above in your browser using DataLab