circda.cv: Cross validation for estimating the classification rate

View source: R/circda.cv.R

dirda.cvR Documentation

Cross validation for estimating the classification rate

Description

Cross validation for estimating the classification rate.

Usage

circda.cv(u, ina, rads = TRUE, folds = NULL, nfolds = 10, stratified = FALSE,
          type = c("vm", "cp", "pn", "gcpc", "cipc"), seed = NULL)

Arguments

u

A numerical vector with the data (expressed in radians, or angles).

ina

A variable indicating the groupings.

rads

If the data are expressed in angles set this to FALSE.

folds

Do you already have a list with the folds? If not, leave this NULL.

nfolds

How many folds to create?

stratified

Should the folds be created in a stratified way? i.e. keeping the distribution of the groups similar through all folds?

seed

If seed is TRUE, the results will always be the same.

type

The distribution to fit, "vm" is von Mises distribution, "cp" is the circular Purkayastha distribution, "pn" is projected normal distribution, "gcpc" is GCPC distribution and "cipc" is CIPC (or wrapped Cauchy) distribution.

Details

Cross-validation for the estimation of the performance of a classifier.

Value

A vector with 5 numbers, one for each distribution, containing the percentage of correct classification. If you chose less distributions to test, the elements of the non-chosen distributions will contain NAs.

Author(s)

Michail Tsagris.

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

References

Tsagris M., Papastamoulis P. and Kato S. (2025). Directional data analysis using the spherical Cauchy and the Poisson kernel-based distribution. Statistics and Computing, 35:51.

Tsagris M. and Alenazi A. (2019). Comparison of discriminant analysis methods on the sphere. Communications in Statistics: Case Studies, Data Analysis and Applications, 5(4), 467–491.

Mardia K. V. and Jupp, P. E. (2000). Directional statistics. Chicester: John Wiley & Sons.

Morris J. E. and Laycock P. J. (1974). Discriminant analysis of directional data. Biometrika, 61(2): 335–341.

See Also

circ.da

Examples

u1 <- rnorm(50, 3, 0.5)
u2 <- rnorm(50, 3, 0.5)
u <- c(u1, u2)
ina <- rep(1:2, each = 50)
circda.cv(u, ina)

circda documentation built on Sept. 15, 2026, 5:09 p.m.