You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Nantia Makrynioti <na...@gmail.com> on 2016/05/12 02:33:29 UTC

Negative probabilities

Hello,

I am using the classifyFullInstance method on a Naive Bayes model, but when
I print the elements of the generated vector, the probabilities are
negative. What might be the reason for this?

Thanks a lot,
Nantia

Re: Negative probabilities

Posted by Nantia Makrynioti <na...@gmail.com>.
Thank you for clarifying this point for me!



2016-05-13 13:53 GMT-04:00 Bertrand Dechoux <de...@gmail.com>:

> The decision rule being "the result is the one with the highest
> probability", it is possible to avoid computation so that this previous
> decision rule is equivalent to "the result is the one with highest score",
> as long as the mathematical transformation from probability to score to not
> change the top class.
>
>
>
> Bertrand Dechoux
>
> On Thu, May 12, 2016 at 4:40 AM, Andrew Palumbo <ap...@outlook.com>
> wrote:
>
> > Hello, the elements of the vector are not actually probabilities, they
> are
> > scores,  the classification is a winner takes all approach, assigning the
> > classification to the class with the max score.
> >
> > See: http://mahout.apache.org/users/algorithms/spark-naive-bayes.html
> for
> > an overview of the algorithm.
> >
> > Thanks
> >
> > ________________________________________
> > From: Nantia Makrynioti <na...@gmail.com>
> > Sent: Wednesday, May 11, 2016 10:33:29 PM
> > To: user@mahout.apache.org
> > Subject: Negative probabilities
> >
> > Hello,
> >
> > I am using the classifyFullInstance method on a Naive Bayes model, but
> when
> > I print the elements of the generated vector, the probabilities are
> > negative. What might be the reason for this?
> >
> > Thanks a lot,
> > Nantia
> >
>

Re: Negative probabilities

Posted by Bertrand Dechoux <de...@gmail.com>.
The decision rule being "the result is the one with the highest
probability", it is possible to avoid computation so that this previous
decision rule is equivalent to "the result is the one with highest score",
as long as the mathematical transformation from probability to score to not
change the top class.



Bertrand Dechoux

On Thu, May 12, 2016 at 4:40 AM, Andrew Palumbo <ap...@outlook.com> wrote:

> Hello, the elements of the vector are not actually probabilities, they are
> scores,  the classification is a winner takes all approach, assigning the
> classification to the class with the max score.
>
> See: http://mahout.apache.org/users/algorithms/spark-naive-bayes.html for
> an overview of the algorithm.
>
> Thanks
>
> ________________________________________
> From: Nantia Makrynioti <na...@gmail.com>
> Sent: Wednesday, May 11, 2016 10:33:29 PM
> To: user@mahout.apache.org
> Subject: Negative probabilities
>
> Hello,
>
> I am using the classifyFullInstance method on a Naive Bayes model, but when
> I print the elements of the generated vector, the probabilities are
> negative. What might be the reason for this?
>
> Thanks a lot,
> Nantia
>

Re: Negative probabilities

Posted by Andrew Palumbo <ap...@outlook.com>.
Hello, the elements of the vector are not actually probabilities, they are scores,  the classification is a winner takes all approach, assigning the classification to the class with the max score.

See: http://mahout.apache.org/users/algorithms/spark-naive-bayes.html for an overview of the algorithm.

Thanks

________________________________________
From: Nantia Makrynioti <na...@gmail.com>
Sent: Wednesday, May 11, 2016 10:33:29 PM
To: user@mahout.apache.org
Subject: Negative probabilities

Hello,

I am using the classifyFullInstance method on a Naive Bayes model, but when
I print the elements of the generated vector, the probabilities are
negative. What might be the reason for this?

Thanks a lot,
Nantia