Learn R Programming

mvcauchy (version 1.0)

Cross-validation for the Cauchy discriminant analysis: Cross-validation for the Cauchy discriminant analysis

Description

Cross-validation for the Cauchy discriminant analysis.

Usage

cv.mvcauchyda(x, ina, nfolds = 10, folds = NULL, stratified = TRUE, seed = NULL)

Value

A list including:

perf

The estimated rate of correct classification.

runtime

The time required by the cross-validation procedure.

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.

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.

Author

Michail Tsagris.

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

Details

Cross validation is performed to select the optimal parameters for the maximum likelihood Cauchy discriminant analysis and also estimate the rate of accuracy.

References

Friedman Jerome, Trevor Hastie and Robert Tibshirani (2017). The elements of statistical learning. New York: Springer.

See Also

mvcauchy.da

Examples

Run this code
mod <- cv.mvcauchyda(as.matrix(iris[, 1:4]), iris[, 5])
mod

Run the code above in your browser using DataLab