Description Usage Arguments Examples
This function implements the adaptive subspace boosting algorithm (AdaSubBoost) as well as random subspace boosting (RSubBoost).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
data |
should be a list with data$x as design matrix and data$y as response |
Iter |
iterations |
K |
parameter K - default is set to 100 |
q |
parameter q - default is set to 10 |
size.fixed |
default is set to NULL |
tau |
parameter tau - default is set to 0.01 |
const |
parameter const - default is set to 0 |
savings |
default is set to 1 |
U_C |
parameter is set to 25 |
family |
default is set to "normal" |
conservative |
default is set to TRUE |
update |
default is set to "S" |
adaptive |
default is set to TRUE (AdaSubBoost), for RSubBoost specify as FALSE |
s_max |
default is set to 20 |
nstop |
default is set to Iter |
automatic.stopping |
default is set to TRUE |
marginal.screening |
default is set to FALSE |
plotting |
default is set to FALSE |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | ### high-dimensional example (AdaSubBoost and RSubBoost)
# load "hdi" package for riboflavin data
require(hdi)
data(riboflavin)
n <- length(riboflavin$y)
p <- dim(riboflavin$x)[2]
# input data format:
# list with design matrix in data$x and response vector in data$y
data <- list()
data$x <- as.matrix(riboflavin$x)
data$y <- as.vector(riboflavin$y)
# constant (gamma) in EBIC
const <- 1
# expected search size
q <- 20
# adaptation parameter
K <- p/q
# maximum size for initial screening
s_max <- 15
# learning rate
tau <- 0.01
# (maximum) number of iterations
Iter <- 1000
# AdaSubBoost
set.seed(123)
output <- AdaSubBoost(data = data, Iter = Iter, const = const,
K = K, q = q, tau = tau, s_max = s_max)
output$selected # selected variables by AdaSubBoost
output$coef[names(output$selected)] # estimated non-zero coefficients by AdaSubBoost
# RSubBoost (no adaptation of sampling probabilites for base-learners)
set.seed(123)
outputRSub <- AdaSubBoost(data = data, Iter = Iter, const = const,
K = K, q = q, tau = tau, s_max = s_max,
adaptive = FALSE)
outputRSub$selected # selected variables by RSubBoost
outputRSub$coef[names(outputRSub$selected)]
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.