Learn R Programming

KODAMA (version 0.0.1)

PLS.SVM.CV: Cross-Validation with Support Vector Machine.

Description

This is function performs a 10-fold cross validation on a given data set using the Support Vector Machine (SVM) classifier. The SVM classifier is performed on the score of the Partial least squares (PLS). The output is a vector of predicted labels.

Usage

PLS.SVM.CV(x,cl,constrain,ncomp=5, ...)

Arguments

x
a matrix.
cl
a classification vector.
constrain
a vector of nrow(data) elements. Sample with the same identificative constrain will be split in the training set or in the test test of cross-validation together.
ncomp
number of component of PLS to consider.
...
parameter for svm classifier.

Value

The function returns a vector of predicted labels.

Details

PLS-SVM classifier was used successfully in Bertini, et al. (2012) and Aimetti, et al. (2012) to classify metabolomic data.

References

Bertini I, Cacciatore S, Jensen BV, et al. Metabolomic NMR fingerprinting to identify and predict survival of patients with metastatic colorectal cancer. Cancer Res 2012;72(1):356-64.

Aimetti M, Cacciatore S, Graziano A, Tenori L. Metabonomic analysis of saliva reveals generalized chronic periodontitis signature. Metabolomics 2012;8(3):465-74.

See Also

KNN.CV,PCA.CA.KNN.CV

Examples

Run this code
data(lymphoma)
class=as.factor(unlist(lymphoma$class))
results=PLS.SVM.CV(lymphoma$data,class,1:length(class))
levels(results)=levels(class)
table(results,class)

Run the code above in your browser using DataLab