predict.ELMBJEN: predict.ELMBJEN

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/predict.ELMBJEN.R

Description

Predicting from A Kernel Extreme Learning Machine Ensemble Using the Buckley-James estimator

Usage

1
2
## S3 method for class 'ELMBJEN'
predict(object, testx, trlength, ...)

Arguments

object

An object that inherits from class ELMBJEN.

testx

A data frame in which to look for variables with which to predict.

trlength

Number of based models used for prediction, shouble be less than and equal to the number for training.

...

Additional arguments.

Value

produces a vector of predictions or a matrix of predictions

Author(s)

Hong Wang

References

See Also

predict.ELMBJ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
set.seed(123)
require(ELMSurv)
require(survival)
#Lung DATA
data(lung)
lung=na.omit(lung)
lung[,3]=lung[,3]-1
n=dim(lung)[1]
L=sample(1:n,ceiling(n*0.5))
trset<-lung[L,]
teset<-lung[-L,]
rii=c(2,3)
# with RBF kernel
elmsurvmodel=ELMBJEN(x=trset[,-rii],y=Surv(trset[,rii[1]],trset[,rii[2]]),
trlength=10,Kernel_type="RBF_kernel",Kernel_para=c(2,1))
#The second base model
fit2=elmsurvmodel$elmcoxfit[[2]]
#The predicted survival
testprelin=predict(elmsurvmodel,teset[,-c(rii)])

ELMSurv documentation built on May 27, 2019, 9:04 a.m.