Get the smoothing parameter.
Get the model type.
Run the algorithm with the configured parameters on an input RDD of LabeledPoint entries.
Run the algorithm with the configured parameters on an input RDD of LabeledPoint entries.
Set the smoothing parameter.
Set the smoothing parameter. Default: 1.0.
Set the model type using a string (case-sensitive).
Set the model type using a string (case-sensitive). Supported options: "multinomial" (default) and "bernoulli".
Trains a Naive Bayes model given an RDD of
(label, features)
pairs.This is the Multinomial NB (http://tinyurl.com/lsdw6p) which can handle all kinds of discrete data. For example, by converting documents into TF-IDF vectors, it can be used for document classification. By making every vector a 0-1 vector, it can also be used as Bernoulli NB (http://tinyurl.com/p7c96j6). The input feature values must be nonnegative.