starnet | R Documentation |
Implements stacked elastic net regression.
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,
...
)
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 |
Post hoc feature selection: consider
argument nzero
in functions
coef
and predict
.
Object of class starnet
.
The slots base
and meta
contain cv.glmnet
-like objects,
for the base and meta learners, respectively.
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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1093/bioinformatics/btaa535")}. (Click here to access PDF.)
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.