## Not run:
# ### compare the performance of several discriminant analysis methods
# ### for the Khan dataset:
# data(khan)
# khanX <- as.matrix(khan[,-1])
# khanY <- khan[,1]
# set.seed(27611)
# fiveCV10iter <- GenerateLearningsets(y=khanY, method = "CV", fold = 5, niter = 2, strat = TRUE)
# ### candidate methods: DLDA, LDA, QDA, pls_LDA, sclda
# class_dlda <- classification(X = khanX, y=khanY, learningsets = fiveCV10iter, classifier = dldaCMA)
# ### peform GeneSlection for LDA, FDA, QDA (using F-Tests):
# genesel_da <- GeneSelection(X=khanX, y=khanY, learningsets = fiveCV10iter, method = "f.test")
# ###
# class_lda <- classification(X = khanX, y=khanY, learningsets = fiveCV10iter, classifier = ldaCMA, genesel= genesel_da, nbgene = 10)
#
# class_qda <- classification(X = khanX, y=khanY, learningsets = fiveCV10iter, classifier = qdaCMA, genesel = genesel_da, nbgene = 2)
#
# ### We now make a comparison concerning the performance (sev. measures):
# ### first, collect in a list:
# dalike <- list(class_dlda, class_lda, class_qda)
# ### use pre-defined compare function:
# comparison <- compare(dalike, plot = TRUE, measure = c("misclassification", "brier score", "average probability"))
# print(comparison)
# ## End(Not run)
Run the code above in your browser using DataLab