You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Tharindu Rusira <th...@gmail.com> on 2014/03/14 13:26:59 UTC

Mahout class responsible for testnb

Hello everyone,
I'm currently writing an application which uses Mahout's NaiveBayes
classification algorithm. In my program, the requirements of my application
reflect a typical classification problem.
1. Train a NaiveBayes model and save it.
2. Use the saved NaiveBayes model to classify new data.

I use org.apache.mahout.classifier.naivebayes.TrainNaiveBayesJob.java to
train the model because this is the class activated by 'trainnb' command.

Now, to achieve the 2nd requirement I'm planning to use the class
corresponding to 'testnb' command which takes a new set of vectors, a model
and a labelindex to determine the label of the new document.
So what is the class responsible for executing 'testnb' ?

Thanks in advance,

-- 
M.P. Tharindu Rusira Kumara

Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
+94757033733
www.tharindu-rusira.blogspot.com

Re: Mahout class responsible for testnb

Posted by Suneel Marthi <su...@yahoo.com>.
TestNaiveBayesDriver.java




On Friday, March 14, 2014 8:27 AM, Tharindu Rusira <th...@gmail.com> wrote:
 
Hello everyone,
I'm currently writing an application which uses Mahout's NaiveBayes
classification algorithm. In my program, the requirements of my application
reflect a typical classification problem.
1. Train a NaiveBayes model and save it.
2. Use the saved NaiveBayes model to classify new data.

I use org.apache.mahout.classifier.naivebayes.TrainNaiveBayesJob.java to
train the model because this is the class activated by 'trainnb' command.

Now, to achieve the 2nd requirement I'm planning to use the class
corresponding to 'testnb' command which takes a new set of vectors, a model
and a labelindex to determine the label of the new document.
So what is the class responsible for executing 'testnb' ?

Thanks in advance,

-- 
M.P. Tharindu Rusira Kumara

Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
+94757033733
www.tharindu-rusira.blogspot.com