Naive Bayes classifiers for compositional data using the alpha-transformation {Compositional}R Documentation

Naive Bayes classifiers for compositional data using the \alpha-transformation

Description

Naive Bayes classifiers for compositional data using the \alpha-transformation.

Usage

alfa.nb(xnew, x, ina, a, type = "gaussian")

Arguments

xnew

A matrix with the new compositional predictor data whose class you want to predict. Zeros are allowed.

x

A matrix with the available compositional predictor data. Zeros are allowed.

ina

A vector of data. The response variable, which is categorical (factor is acceptable).

a

This can be a vector of values or a single number.

type

The type of naive Bayes, "gaussian", "cauchy" or "laplace".

Details

The \alpha-transformation is applied to the compositional and a naive Bayes classifier is employed.

Value

A matrix with the estimated groups. One column for each value of \alpha.

Author(s)

Michail Tsagris.

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

References

Tsagris M.T., Preston S. and Wood A.T.A. (2011). A data-based power transformation for compositional data. In Proceedings of the 4th Compositional Data Analysis Workshop, Girona, Spain. https://arxiv.org/pdf/1106.1451.pdf

Friedman J., Hastie T. and Tibshirani R. (2017). The elements of statistical learning. New York: Springer.

See Also

comp.nb, alfa.rda, alfa.knn, comp.knn, mix.compnorm

Examples

x <- Compositional::rdiri(100, runif(5) )
ina <- rbinom(100, 1, 0.5) + 1
mod <- alfa.nb(x, x, a = c(0, 0.1, 0.2), ina )

[Package Compositional version 6.8 Index]