elm: Extreme learning machine for survival, classification,...

Description Usage Arguments Value Examples

View source: R/ELM_Survival.R

Description

Extreme learning machine for survival, classification, regression (univariate / multivariate)

Usage

 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"))

Arguments

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

Value

elm object.

Examples

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, ])

linxihui/sml documentation built on May 21, 2019, 6:39 a.m.