Stochasta::Bayes::NaiveClassifier(C, F)
Multinomial/Categorical Naive Bayes Classifier C is the Class type, F is the Feature type
Constructors
new
SourceInstance methods
class_counts
Sourcefeature_counts
SourcePredicts the most likely class for the given features Uses log probabilities to prevent underflow, and Laplace smoothing (+1)
Computes probability distribution over all classes for the given features
total_samples
SourceTrains the classifier on a single sample of features with its label
vocabulary
Source