For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > November 2006 > Re: Naive Bayes classification module of CPAN









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Naive Bayes classification module of CPAN
Saurabh Singhvi

2006-11-01, 7:58 am

Thanks a lot Rob. That makes things clear.

Also, there is one thing that I didn't understand about this.
If I use Frequence based or Gaussian based models, I do
not get correct results. As in, the prediction is always the
same label, though weights are a little differenct each time.

However, thngs work pretty well if I use Discrete model. So
what's the reason behind this??

I looked at AI::Categorizer and could not understand how to
use it for a similar case as this, so if someone could explain
that, it'd be great.

thanks
Saurabh

On 11/1/06, Rob Dixon <rob.dixon@350.com> wrote:
>
> Saurabh Singhvi wrote:
> the
> the
> where
>
>
> There is no single result Surabh, the hash tells you how well each of the
> category labels applies to the attribute set you specified in the call to
> predict(). The nearer the key value is to 1 the better the category
> corresponds
> with the attributes. You could choose one of the labels returned byt
> simply
> picking the one with the highest key value, but you really need to look at
> the
> whole data set as even the best match may be a very bad one, or there may
> be
> several very good ones.
>
> Display your results with
>
> printf "%s => %s\n" $_, $result->{$_} foreach keys %$result;
>
> HTH,
>
> Rob
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com