pccv-harcv: Optimizing PC/ harmonics number

Description Usage Arguments Value See Also

Description

A wrapper function to optimize dimension reduction using multiple-run k-fold cross validation. Different number of PCs/ harmonics are used in training the classification model and the result (misclassification rate) is plotted out.

Usage

1
2
3
4
5
pccv(X, Y, pc, saveplot = FALSE, plotsize = 1000, method = c("lda", "tree", 
  "plsda"), run = 30, k = 5)
  
harcv(X, Y, har, saveplot = FALSE, plotsize = 1000, method = c("lda", "tree", 
  "plsda"), run = 30, k = 5)

Arguments

X

[for pccv] matrix of PC scores from rGPA object (the score value) [for harcv] matrix of EFA coefficients from rNEF object (the coeff value)

Y

a factor giving the groupings, e.g. value from getclass or the sp value from routine1 object

pc

[for pccv] numeric. number of PCs to be tested.

har

[for harcv] numeric. number of harmonics to be tested.

saveplot

logical. The plot will be saved if TRUE, and no plot is displayed in the window. Note that outliers of boxplot are not plotted.

plotsize

numeric. Plot size for the plot saved into file (used only when saveplot=TRUE), unit in pixel.

method

argument to be passed to mrkfcv

run

argument to be passed to mrkfcv

k

argument to be passed to mrkfcv

Value

a matrix and a plot are returned, giving the misclassification rate of the range of PCs/ harmonics tested.

See Also

Similar: threcv

Which this function wraps: mrkfcv


jinyung/otolith documentation built on May 19, 2019, 10:36 a.m.