Svetlomir, Unfortunately, naive bayes does not output a probability score. Ted Dunning has explained the bayes score in a separate email thread with subject "Scoring issue". I will also forward you that email chain.
I am copying here the excerpts: ************************************************ Naive Bayes does not produce a viable probability score (SGD tries to, in contrast). These scores are comparable between categories for a single document. Comparing scores for different documents is not easy. You may be able to calibrate the scores, but I don't know if that will work. Have you read Renny's paper? http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.13.8572 ************************************************ Thanks gaurav On Wed, May 4, 2011 at 6:16 PM, Svetlomir Kasabov < [email protected]> wrote: > Hello Gaurav, > > thanks for your reply. I tried your hint but it still does not lead me to a > probability for a single training example. How can I use the score > of a classified training example to get a probability ? > > Thanks a lot and many regards. > > Svetlomir. > > > Sent from BlackBerry® on Airtel >> >> -----Original Message----- >> From: gaurav garg<[email protected]> >> Date: Wed, 4 May 2011 00:37:53 >> To:<[email protected]> >> Reply-To: [email protected] >> Cc:<[email protected]> >> Subject: Re: Nave Bayes Classifier and probability calculation for a >> single >> test example >> >> Hi Svetlomir, >> >> You can use ClassifierContext class ( >> >> https://builds.apache.org/hudson/job/Mahout-Quality/javadoc/index.html?org/apache/mahout/common/StringTuple.html >> ) >> to get the top N matching result and their respective scores. >> >> Hope it helps. >> >> Thanks >> Gaurav >> > > > -- Gaurav Garg
