Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

compppr.tune

Tuning of the projection pursuit regression for compositional data


Description

Tuning of the projection pursuit regression for compositional data In addition, estimation of the rate of correct classification via K-fold cross-validation.

Usage

compppr.tune(y, x, nfolds = 10, folds = NULL, seed = FALSE,
nterms = 1:10, type = "alr", yb = NULL )

Arguments

y

A matrix with the available compositional data, but zeros are not allowed.

x

A matrix with the continuous predictor variables.

nfolds

The number of folds to use.

folds

If you have the list with the folds supply it here.

seed

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

nterms

The number of terms to try in the projection pursuit regression.

type

Either "alr" or "ilr" corresponding to the additive or the isometric log-ratio transformation respectively.

yb

If you have already transformed the data using a log-ratio transformation put it here. Othewrise leave it NULL.

Details

The function performs tuning of the projection pursuit regression algorithm.

Value

A list including:

kl

The average Kullback-Leibler divergence.

perf

The average Kullback-Leibler divergence.

runtime

The run time of the cross-validation procedure.

Author(s)

Michail Tsagris.

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

References

Friedman, J. H. and Stuetzle, W. (1981). Projection pursuit regression. Journal of the American Statistical Association, 76, 817-823. doi: 10.2307/2287576.

See Also

Examples

y <- as.matrix(iris[, 1:3])
y <- y/ rowSums(y)
x <- iris[, 4]
mod <- compppr.tune(y, x)

Compositional

Compositional Data Analysis

v4.6
GPL (>= 2)
Authors
Michail Tsagris [aut, cre], Giorgos Athineou [aut], Abdulaziz Alenazi [ctb]
Initial release
2021-04-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.