The Naive Bayes model is serialized automatically as "naiveBayesModel.bin" in 
by TrainNaiveBayesJob.java [1] (the driver for $ mahout trainnb).

To give you an idea of how, the serialization code can be found in 
NaiveBayesModel.java line 135 [2]

[1] 
https://github.com/apache/mahout/blob/master/mrlegacy/src/main/java/org/apache/mahout/classifier/naivebayes/training/TrainNaiveBayesJob.java
[2] 
https://github.com/apache/mahout/blob/master/mrlegacy/src/main/java/org/apache/mahout/classifier/naivebayes/NaiveBayesModel.java


> To: user@mahout.apache.org
> From: vanyasinha110...@gmail.com
> Subject: Naive Bayes Classification
> Date: Tue, 11 Nov 2014 10:59:54 +0000
> 
> Hi. I'm new to Mahout and am building a classification mechanism on 
> Windows, which needs me to save the trained model into a file. The 
> ModelSerializer class is only available for SGD based algorithms from the 
> looks of it. Can someone please help me with saving the Complementary 
> Naive Bayes model after training along with its conf and other helper 
> files into a given path?
> 
                                          

Reply via email to