Cauchy naive Bayes classifier {mvcauchy}R Documentation

Cauchy naive Bayes classifier

Description

Cauchy naive Bayes classifier.

Usage

cauchy.nb(xnew = NULL, x, ina)

Arguments

xnew

A numerical matrix with new predictor variables whose group is to be predicted. This is set to NUUL, as you might want just the model and not to predict the membership of new observations.

x

A numerical matrix with the observed predictor variable values.

ina

A numerical vector with strictly positive numbers, i.e. 1,2,3 indicating the groups of the dataset. Alternatively this can be a factor variable.

Value

Depending on the classifier a list including (the ni and est are common for all classifiers):

location

A matrix with the location parameters (medians).

scale

A matrix with the scale parameters.

ni

The sample size of each group in the dataset.

est

The estimated group of the xnew observations. It returns a numerical value back regardless of the target variable being numerical as well or factor. Hence, it is suggested that you do \"as.numeric(ina)\" in order to see what is the predicted class of the new data.

Author(s)

Michail Tsagris.

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

See Also

cauchynb.pred, cv.cauchynb

Examples

x <- as.matrix(iris[, 1:4])
a <- cauchy.nb(x, x, ina = iris[, 5])

[Package mvcauchy version 1.0 Index]