Block-Randomized Adaptive Iterative Lasso
BRAIL(X, y, family = c("gaussian", "binomial", "poisson"), tau = 0.8, B = 200, doPar = TRUE, lasso.control = list(), ridge.control = list())
X | is a list containing k matrices, each of the matrices has n rows. They are the 'blocks'. |
---|---|
y | is the response vector of length n. |
family | is a description of the error distribution and link function to be used in the model. In our package, the character string can be "binomial", "gaussian" or "poisson". |
tau | is the stability cut-off, which is used for choosing the support features in each block. |
B | is the number of bootstraps in each iteration. |
doPar | is logical value to indicate if the process should be run parallelly by foreach, if FALSE, the doPar will be disabled. The default value is TRUE. |
lasso.control | is a list of glmLasso related arguments, like support_stability, thresh and max.iter. |
ridge.control | is a list of ridgeLasso related arguments, like lambda, max.iter and thresh. |
a list containing n vectors. Each element of the list will be a vector of length p_k, where p_k is the number of columns in the k-th block.
n <- 5 p <- 10 X <- lapply(1:2, function(x) {matrix(rnorm(n * p), n, p)}) y <- rnorm(n) BRAIL(X, y, family = "gaussian", tau = 0.8, B = 20, doPar = TRUE, lasso.control= list(support_stability = 10, max.iter = 1e6), ridge.control = list(max.iter = 1e4, thresh = 1e-5))#> Warning: executing %dopar% sequentially: no parallel backend registered#> $coefficients #> $coefficients[[1]] #> [1] 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 0.0000000 #> [8] 0.0000000 0.0000000 0.2760238 #> #> $coefficients[[2]] #> [1] 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 #> [7] 0.00000000 0.00000000 -0.07142353 0.00000000 #> #> #> $scores #> $scores[[1]] #> [1] 0.00 0.05 0.05 0.05 0.00 0.00 0.00 0.05 0.00 1.00 #> #> $scores[[2]] #> [1] 0.00 0.65 0.20 0.70 0.25 0.00 0.15 0.05 0.55 0.15 #> #>