You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by vsinha <va...@gmail.com> on 2014/11/11 11:59:54 UTC
Naive Bayes Classification
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?
RE: Naive Bayes Classification
Posted by Andrew Palumbo <ap...@outlook.com>.
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: vanyasinha110493@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?
>