Description Usage Arguments Value Author(s) References See Also Examples
Grow a survival forest with partial least squares(PLS)
1 2 3 |
x |
The covariates(predictor variables) of training data. |
y |
Survival time and censored status of training data. Must be a Surv |
trlength |
The ensemle size (the number of base survival trees). Default is 100. |
mtry |
The number of covariates(predictor variables) used in each base tree model. Default is the square root of the number of all avaibable covariates. |
vari_status |
Whether or not calculate variables importance scores. Default is "FALSE". |
... |
Additional arguments for the base decision tree, see the |
Object of class rrotsfspls
with elements
pectrees | A list of base models pecRpart in pec R package of size trlength . To retrieve a particular base model: use pectrees[[i]], where i takes values between 1 and trlength |
colindexes | A list of covaraite subspace index for each base tree. |
trlength | Number of bases models trained. |
rotms | A list of PLS weights matrix.To retrieve a particular weight matrix: use rotms[[i]], where i takes values between 1 and trlength |
varimp | If vari_status=FALSE , return a Matrix of variable importance scores. |
Hong Wang and Lifeng Zhou
Zhou L, Xu Q, Wang H. (2015) Rotation survival forest for right censored data. PeerJ 3:e1009 https://doi.org/10.7717/peerj.1009.
Zhou, L., Wang, H., & Xu, Q. (2016). Random rotation survival forest for high dimensional censored data. SpringerPlus, 5(1), 1425.
pec
R package
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | set.seed(123)
require(rotsf)
require(survival)
## Survival Forest with PLS with default settings
#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)
plssurvmodel=rrotsfspls(x=trset[,-rii],y=Surv(trset[,rii[1]], trset[,rii[2]]))
# Get the 1th base model
firstbasemodel=plssurvmodel$pectrees[[1]]
#second PLS weight matrix
secondweigmatrix=plssurvmodel$rotms[[2]]
plssurvmodel2=rrotsfspls(x=trset[,-rii],y=Surv(trset[,rii[1]], trset[,rii[2]]),vari_status=TRUE)
#variable importance
varimpscores=plssurvmodel2$varimp
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.