starnet {starnet} | R Documentation |
Stacked Elastic Net Regression
Description
Implements stacked elastic net regression.
Usage
starnet(
y,
X,
family = "gaussian",
nalpha = 21,
alpha = NULL,
nfolds = 10,
foldid = NULL,
type.measure = "deviance",
alpha.meta = 1,
penalty.factor = NULL,
intercept = NULL,
upper.limit = NULL,
unit.sum = NULL,
...
)
Arguments
y |
response:
numeric vector of length |
X |
covariates:
numeric matrix with |
family |
character "gaussian", "binomial" or "poisson" |
nalpha |
number of |
alpha |
elastic net mixing parameters:
vector of length |
nfolds |
number of folds |
foldid |
fold identifiers:
vector of length |
type.measure |
loss function:
character "deviance", "class", "mse" or "mae"
(see |
alpha.meta |
meta-learner:
value between |
penalty.factor |
differential shrinkage:
vector of length |
intercept , upper.limit , unit.sum |
settings for meta-learner: logical,
or |
... |
further arguments passed to |
Details
Post hoc feature selection: consider
argument nzero
in functions
coef
and predict
.
Value
Object of class starnet
.
The slots base
and meta
contain cv.glmnet
-like objects,
for the base and meta learners, respectively.
References
Armin Rauschenberger, Enrico Glaab, and Mark A. van de Wiel (2021). "Predictive and interpretable models via the stacked elastic net". Bioinformatics 37(14):2012-2016. doi:10.1093/bioinformatics/btaa535. (Click here to access PDF.)
Examples
set.seed(1)
n <- 50; p <- 100
y <- rnorm(n=n)
X <- matrix(rnorm(n*p),nrow=n,ncol=p)
object <- starnet(y=y,X=X,family="gaussian")