Description Usage Arguments Value Examples
Extreme learning machine for survival, classification, regression (univariate / multivariate)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | elm(x, ...)
## S3 method for class 'formula'
elm(formula, data = environment(formula), ...)
## Default S3 method:
elm(x, y, nhid = max(200, 2 * ncol(x)), actfun = "sig",
scaled = TRUE, family = switch(class(y), Surv = "cox", factor =
ifelse(nlevels(y) > 2, "multinomial", "binomial"), integer = "poisson", matrix
= "mgaussian", "gaussian"), lambda = ifelse(family == "mgaussian", 0, 1),
...)
## S3 method for class 'elm'
predict(object, newdata, type = c("response", "probabilities",
"link", "risk"))
|
x |
Design matrix |
... |
Further parameters passed to internal function |
formula |
Model formula |
data |
Training data frame |
y |
Survival object, factor or a vector/matrix of continuous variable |
nhid |
Number of (random) hidden neurons |
actfun |
Activating function |
scaled |
If to standardize input units |
family |
Choices of 'cox', 'binomial', 'multinomial', 'poisson', 'gaussian', 'mgaussian' |
lambda |
Shrinkage factor |
object |
elm object |
newdata |
A data frame (if elm called via formula) or a design matrix (if elm called via design matrix) |
type |
Type of output |
elm object.
1 2 3 4 5 6 7 8 | library(survival);
data(pbc, package = 'randomForestSRC');
pbc <- na.omit(pbc);
i.tr <- sample(nrow(pbc), 100);
elm.f <- elm(Surv(days, status) ~., data = pbc[i.tr, ], nhid = 500);
elm.pred <- predict(object = elm.f, newdata = pbc[-i.tr, ], type = 'link');
survConcordance(Surv(days, status) ~ elm.pred, data = pbc[-i.tr, ])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.