Module NaiveBayes

Naive Bayes is a supervised classification algorithm that uses Bayes
rule to compute the fit between a new observation and some previously
observed data. The observations are discrete feature vectors, with
the Bayes assumption that the features are independent. Although this
is hardly ever true, the classifier works well enough in practice.

Glossary:

observation - A feature vector of discrete data.

class - A possible classification for an observation.

Classes:

NaiveBayes - Holds information for a naive Bayes classifier.

Functions:

train - Train a new naive Bayes classifier.

calculate - Calculate the probabilities of each class,
given an observation.