| dirda.cv | R Documentation |
Cross validation for estimating the classification rate.
circda.cv(u, ina, rads = TRUE, folds = NULL, nfolds = 10, stratified = FALSE,
type = c("vm", "cp", "pn", "gcpc", "cipc"), seed = NULL)
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. |
Cross-validation for the estimation of the performance of a classifier.
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.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.
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.
circ.da
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.