| rf_z {MAclinical} | R Documentation |
This function builds a prediction rule based on the learning data (clinical predictors only)
and applies it to the test data. It uses the function cforest from the package party. See Boulesteix et al (2008) for more details.
rf_z(Xlearn=NULL,Zlearn,Ylearn,Xtest=NULL,Ztest,...)
Xlearn |
A nlearn x p matrix giving the microarray predictors for the learning data set. This argument is ignored. |
Zlearn |
A nlearn x q matrix giving the clinical predictors for the learning data set. |
Ylearn |
A numeric vector of length nlearn giving the class membership of the learning observations, coded as 0,...,K-1 (where K is the number of classes). |
Xtest |
A ntest x p matrix giving the microarray predictors for the test data set. This argument is ignored. |
Ztest |
A ntest x q matrix giving the clinical predictors for the test data set. |
... |
Other arguments to be passed to the function cforest_control from the party package. |
See Boulesteix et al (2008).
A list with the elements:
prediction |
A numeric vector of length nrow(Xtest) giving the predicted class for
each observation from the test data set. |
importance |
The variable importance information output
by the function varimp from the package party. |
OOB |
The out-of-bag error of the constructed forest. |
Anne-Laure Boulesteix (http://www.slcmsr.net/boulesteix)
Boulesteix AL, Porzelius C, Daumer M, 2008. Microarray-based classification and clinical predictors: On combined classifiers and additional predictive value. Bioinformatics 24:1698-1706.
testclass, testclass_simul, simulate,
plsrf_x_pv, plsrf_xz_pv, plsrf_x, plsrf_xz,
logistic_z, svm_x.
# load MAclinical library # library(MAclinical) # Generating zlearn, ylearn, ztest zlearn<-matrix(rnorm(120),30,4) ylearn<-sample(0:1,30,replace=TRUE) ztest<-matrix(rnorm(80),20,4) my.prediction<-rf_z(Zlearn=zlearn,Ylearn=ylearn,Ztest=ztest) my.prediction