lpdaCV: Crossvalidation procedure for lpda evaluation
Description
lpdaCV evaluates the error rate classification with a crossvalidation procedure
Usage
lpdaCV(data, group, scale = FALSE, pca = FALSE, PC = 2, Variability = NULL,
CV = "ktest", ntest = 10, R = 10, f1 = NULL, f2 = NULL)
# S3 method for lpdaCV
print(x, ...)
Value
lpdaCV returns the prediction error rate classification.
Arguments
data
Matrix containing data. Individuals in rows and variables in columns
group
Vector with the variable group
scale
Logical indicating if it is required standardize data.
pca
Logical indicating if a reduction of dimension is required
PC
Number of Principal Components (PC) for PCA. By default it is 2. When the number of PC is not decided, it can be determined choosing the desired proportion of explained variability (Variability parameter) or choosing the maximum number of errors allowed in the training set (Error.max).
Variability
Parameter for Principal Components (PC) selection. This is the desired
proportion of variability explained for the PC of the variables.
CV
Crossvalidation mode: loo "leave one out" or ktest: that leaves k in the test set.
ntest
Number of samples to evaluate in the test-set.
R
Number of times that the error is evaluated.
f1
Vector with weights for individuals of the first group. If NULL they are equally weighted.
f2
Vector with weights for individuals of the second group. If NULL they are equally weighted.
x
An object of class "lpdaCV", a result of a call to lpdaCV or lpdaCV.3D.