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

vmnb.pred

Prediction with some naive Bayes classifiers for circular data


Description

Prediction with some naive Bayes classifiers for circular data.

Usage

vmnb.pred(xnew, mu, kappa, ni)
spmlnb.pred(xnew, mu1, mu2, ni)

Arguments

xnew

A numerical matrix with new predictor variables whose group is to be predicted. Each column refers to an angular variable.

mu

A matrix with the mean vectors expressed in radians.

mu1

A matrix with the first set of mean vectors.

mu2

A matrix with the second set of mean vectors.

kappa

A matrix with the kappa parameters for the vonMises distribution or with the norm of the mean vectors for the circular angular Gaussian distribution.

ni

The sample size of each group in the dataset.

Details

Each column is supposed to contain angular measurements. Thus, for each column a von Mises distribution or an circular angular Gaussian distribution is fitted. The product of the densities is the joint multivariate distribution.

Value

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

Author(s)

Michail Tsagris

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

See Also

Examples

x <- matrix( runif( 100, 0, 1 ), ncol = 2 )
ina <- rbinom(50, 1, 0.5) + 1
a <- vm.nb(x, x, ina)
a2 <- vmnb.pred(x, a$mu, a$kappa, a$ni)

Rfast2

A Collection of Efficient and Extremely Fast R Functions II

v0.0.9
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Initial release
2021-03-21

We don't support your browser anymore

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