rf_z: Class prediction based on random forests using clinical...

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

View source: R/rf_z.r

Description

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.

Usage

1
rf_z(Xlearn=NULL,Zlearn,Ylearn,Xtest=NULL,Ztest,...)

Arguments

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.

Details

See Boulesteix et al (2008).

Value

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.

Author(s)

Anne-Laure Boulesteix (http://www.ibe.med.uni-muenchen.de/organisation/mitarbeiter/020_professuren/boulesteix/)

References

Boulesteix AL, Porzelius C, Daumer M, 2008. Microarray-based classification and clinical predictors: On combined classifiers and additional predictive value. Bioinformatics 24:1698-1706.

See Also

testclass, testclass_simul, simulate, plsrf_x_pv, plsrf_xz_pv, plsrf_x, plsrf_xz, logistic_z, svm_x.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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

MAclinical documentation built on May 2, 2019, 9:30 a.m.

Related to rf_z in MAclinical...