apache/spark — pull request #2491 by staple (2014-09-22 18:09:41+00:00)
Title: [SPARK-1655][MLLIB] Add option for distributed naive bayes model.

Adds an option to store a naive bayes model distributively. The default behavior, in which the whole model is stored on the driver node, remains unchanged. NaiveBayes.train’s new distMode parameter can be used to request that a model be distributed.

When distributed, the model is stored as an RDD of model blocks. Each block contains the labels and prior and conditional probabilities for a set of label classes, allowing fast computation of the maximum a posteriori prediction for each block and straightforward aggregation of these MAP predictions across blocks.