Description Usage Arguments Value Author(s) References Examples
View source: R/predict.ELMCoxBAR.R
Predicting with an ELMCoxBAR model
1 2 |
object |
An object that inherits from class ELMBJEN. |
newdata |
A data frame in which to look for variables with which to predict. |
... |
Additional arguments. |
produces a vector of predictions or a matrix of predictions
Hong Wang
Wang, H, Li, G. Extreme learning machine Cox model for high-dimensional survival analysis. Statistics in Medicine. 2019; 38:2139-2156.
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)
# Default with lin_kernel
elmsurvmodel=ELMCoxBAR(x=trset[,-rii],y=Surv(trset[,rii[1]], trset[,rii[2]]))
# with the RBF kernel
elmsurvmodel=ELMCoxBAR(x=trset[,-rii],y=Surv(trset[,rii[1]],
trset[,rii[2]]),Kernel_type="RBF_kernel",Kernel_para=c(2,1))
#The predicted linear predictor
testprelin=predict(elmsurvmodel,teset[,-c(rii)])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.