
PCA.CA.KNN.CV(x,cl,constrain,kn=10,variance=0.9)
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.Saccenti E, Tenori L, Verbruggen P, et al. Of monkeys and men: a metabolomic analysis of static and dynamic urinary metabolic phenotypes in two species. PLoS One 2014;9(9):e106077.
PLS.SVM.CV
,KNN.CV
data(MetRef);
u=MetRef$data;
u=u[,-which(colSums(u)==0)]
u=scaling(u)$newXtrain
class=as.factor(unlist(MetRef$donor))
results=PCA.CA.KNN.CV(u,class,1:length(class))
levels(results)=levels(class)
table(results,class)
Run the code above in your browser using DataLab