Cross-validation for the robust quadratic discriminant analysis {robqda}R Documentation

Cross-validation for the robust quadratic discriminant analysis

Description

Cross-validation for the robust quadratic discriminant analysis.

Usage

robqda.cv(x, ina, nfolds = 10, quantile.used = floor((n + p + 1)/2),
nsamp = "best", folds = NULL, stratified = TRUE, seed = NULL)

Arguments

x

A matrix with the data.

ina

A group indicator variable for the avaiable data.

nfolds

The number of folds in the cross validation.

folds

If you have the list with the folds supply it here. You can also leave it NULL and it will create folds.

quantile.used

A number, the minimum number of the data points regarded as good points.

nsamp

The number of samples or "best", "exact", or "sample". The limit If "sample" the number chosen is min(5 * p, 3000), taken from Rousseeuw and Hubert (1997). If "best" exhaustive enumeration is done up to 5000 samples: if "exact" exhaustive enumeration will be attempted.

stratified

Do you want the folds to be created in a stratified way? TRUE or FALSE.

seed

You can specify your own seed number here or leave it NULL.

Details

Cross validation is performed to estimate the rate of accuracy in the robust quadratic discriminant analysis.

Value

A list including:

per

A vector with the estimated rate of correct classification for every fold.

percent

A matrix with the mean estimated rates of correct classification.

runtime

The time required by the cross-validation procedure.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Friedman Jerome, Trevor Hastie and Robert Tibshirani (2009). The elements of statistical learning, 2nd edition. Springer, Berlin.

See Also

robqda

Examples

x <- as.matrix(iris[, 1:4]) + matrix(rnorm(150 * 4), ncol = 4 )
mod <- robqda.cv(x, iris[, 5], nfolds = 5)
mod

[Package robqda version 1.0 Index]