svm: Classification based on support vector machines using...

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

Description

This function builds a prediction rule based on the learning data (microarray predictors only) and applies it to the test data. Prediction is performed based on support vector machines. The function svm_x uses the function svm from the package e1071.

Usage

1
svm_x(Xlearn,Zlearn=NULL,Ylearn,Xtest,Ztest=NULL,ordered=NULL,nbgene=NULL,...)

Arguments

Xlearn

A nlearn x p matrix giving the microarray predictors for the learning data set.

Zlearn

A nlearn x q matrix giving the clinical predictors for the learning data set. This argument is ignored.

Ylearn

A numeric vector of length nlearn giving the class membership of the learning observations, coded as 0,1.

Xtest

A ntest x p matrix giving the microarray predictors for the test data set.

Ztest

A ntest x q matrix giving the clinical predictors for the test data set. This argument is ignored.

ordered

A vector of length p giving the order of the microarray predictors in terms of relevance for prediction. For instance, if the three first elements of ordered are 30,2,2400, it means that the most relevant genes are the genes in the 30th, 2nd and 2400th columns of the gene expression data matrix Xlearn. Note: if ordered=NULL, the columns of Xlearn and Xtest are assumed to be already ordered.

nbgene

The number of genes to be selected for use in dimension reduction. Default is nbgene=NULL, in which case all genes are used.

...

Other arguments to be passed to the function svm from the e1071 package.

Details

This function is included in the package for comparison.

Value

A list with the element

prediction

A numeric vector of length nrow(Xtest) giving the predicted class for each observation from the test data set.

Author(s)

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

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, plsrf_xz_pv, rf_z, logistic_z.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# load MAclinical library
# library(MAclinical)

# Generating xlearn, zlearn, ylearn, xtest, ztest
xlearn<-matrix(rnorm(3000),30,100)
ylearn<-sample(0:1,30,replace=TRUE)
xtest<-matrix(rnorm(2000),20,100)

my.prediction1<-svm_x(Xlearn=xlearn,Ylearn=ylearn,Xtest=xtest)

ordered<-sample(100)
my.prediction2<-svm_x(Xlearn=xlearn,Ylearn=ylearn,Xtest=xtest,ordered=ordered,nbgene=20)

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

Related to svm in MAclinical...