Cross-validation for the alpha-SCLS model {Compositional}R Documentation

Cross-validation for the alpha-SCLS model

Description

Cross-validation for the alpha-SCLS model.

Usage

cv.ascls(y, x, a = seq(0.1, 1, by = 0.1), nfolds = 10, folds = NULL, seed = NULL)

Arguments

y

A numerical matrix with the simplicial response data. Zero values are allowed.

x

A matrix with the simplicial predictor variables. Zero values are allowed.

a

A vector or a single number of values of the \alpha-parameter. This has to be different from zero, and it can take negative values if there are no zeros in the simplicial response (y).

nfolds

The number of folds for the K-fold cross validation, set to 10 by default.

folds

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

seed

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

Details

The K-fold cross validation is performed in order to select the optimal value for \alpha of the \alpha-SCLS model.

Value

A list including:

runtime

The runtime of the cross-validation procedure.

kl

The Kullback-Leibler divergence for every value of \alpha.

js

The Jensen-Shannon divergence for every value of \alpha.

Author(s)

Michail Tsagris.

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

References

Tsagris. M. (2024). Constrained least squares simplicial-simplicial regression. https://arxiv.org/pdf/2403.19835.pdf

See Also

ascls, cv.atflr

Examples

library(MASS)
y <- rdiri( 214, runif(4, 1, 3) )
x <- as.matrix( fgl[, 2:9] )
mod <- cv.ascls(y, x, nfolds = 5)

[Package Compositional version 6.8 Index]