MVA.cv(X, Y, repet = 10, k = 7, ncomp = 5, model = c("PLSR","CPPLS",
"PLS-DA", "PPLS-DA", "LDA", "QDA", "PLS-DA/LDA", "PLS-DA/QDA", "PPLS-DA/LDA",
"PPLS-DA/QDA"), lower = 0.5, upper = 0.5, Y.add = NULL, weights = rep(1,
nrow(X)), set.prior = FALSE, crit.DA = c("plug-in", "predictive",
"debiased"), ...)cppls.fit).cppls.fit).cppls.fit).cppls.fit).TRUE, the prior probabilities of class membership are defined according to the mean weight of individuals belonging to each class. If FALSE, prior propredict.lda.repet*k models), for PLSR, CPPLS, PLS-DA, PPLS-DA, LDA and QDA.repet*k models), for PLS-DA/LDA, PLS-DA/QDA, PPLS-DA/LDA and PPLS-DA/QDA.repet*k models), for PLS-DA/LDA, PLS-DA/QDA, PPLS-DA/LDA and PPLS-DA/QDA.repet values).repet values).repet values)."PLS-DA", "PPLS-DA", "LDA", "QDA", "PLS-DA/LDA", "PLS-DA/QDA", "PPLS-DA/LDA" or "PPLS-DA/QDA"), the training sets are generated in respect to the relative proportions of the levels of Y in the original data set (see splitf).
"PLS-DA" is considered as PLS2 on a dummy-coded response. For a PLS-DA based on the CPPLS algorithm, use "PPLS-DA" with lower and upper limits of the power parameters set to 0.5.predict.MVA.cmv, mvr, lda, qdarequire(pls)
require(MASS)
# PLSR
data(yarn)
MVA.cv(yarn$NIR,yarn$density,model="PLSR")
# PPLS-DA coupled to LDA
data(mayonnaise)
MVA.cv(mayonnaise$NIR,factor(mayonnaise$oil.type),model="PPLS-DA/LDA",crit.inn="NMC")Run the code above in your browser using DataLab