Prediction with Cauchy naive Bayes classifier {mvcauchy}R Documentation

Prediction with Cauchy naive Bayes classifier

Description

Prediction with Cauchy naive Bayes classifier.

Usage

cauchynb.pred(xnew, location, scale, ni)

Arguments

xnew

A numerical matrix with new predictor variables whose group is to be predicted.

location

A matrix with the group location parameters of the Cauchy distribution. Each row corresponds to a group.

scale

A matrix with the group scale parameters of the Cauchy distribution. Each row corresponds to a group.

ni

A vector with the frequencies of each group.

Value

A numerical vector with 1, 2, ... denoting the predicted group.

Author(s)

Michail Tsagris.

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

References

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

See Also

cauchy.nb, cv.cauchynb

Examples

x <- as.matrix(iris[, 1:4])
ina <- iris[, 5]
a <- cauchy.nb(x, x, ina = ina)
est <- cauchynb.pred(x, a$location, a$scale, a$ni)
table(ina, est)

[Package mvcauchy version 1.0 Index]