You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by "Scot L. Harris" <we...@cfl.rr.com> on 2004/07/15 18:48:04 UTC

Can bayes lower a score?

Is it possible for bayes to add a negative score to a message?

Had a message passed to me that scored 4.1.  The rules it hit on was one
that adds 5.0 that I wrote and bayes_20.  No other rules seemed to have
hit on this particular message.  

When I tried running the message through by hand it scored 6.1 but with
bayes_99 that time.  I think this was due to an sa-learn session having
been run that morning so the bayes database was different on this run
from when the message was received.  

My assumption is that bayes can apply a negative score if the message
matches ham it has learned in the past.  Hopefully someone can confirm
this or inform me how it really works.

Thanks.
-- 
Scot L. Harris
webid@cfl.rr.com

In God we trust; all else we walk through. 


Re: Can bayes lower a score?

Posted by Jim Maul <jm...@elih.org>.
Quoting "Scot L. Harris" <we...@cfl.rr.com>:

> Is it possible for bayes to add a negative score to a message?
>
> Had a message passed to me that scored 4.1.  The rules it hit on was one
> that adds 5.0 that I wrote and bayes_20.  No other rules seemed to have
> hit on this particular message.
>
> When I tried running the message through by hand it scored 6.1 but with
> bayes_99 that time.  I think this was due to an sa-learn session having
> been run that morning so the bayes database was different on this run
> from when the message was received.
>
> My assumption is that bayes can apply a negative score if the message
> matches ham it has learned in the past.  Hopefully someone can confirm
> this or inform me how it really works.
>

Yes, the lower bayes scores (like BAYES_00) are negative scores by 
default.  You
can, of course, modify this to your liking.  I personally set mine even more
negative.

Jim

Re: Can bayes lower a score?

Posted by Ryan Thompson <sp...@sasknow.com>.
Scot L. Harris wrote to Spamassasin Users List:

> Is it possible for bayes to add a negative score to a message?

Yes. That's the point of Bayes; it's a classifier that assigns a
statistical probability (between 0 and 1) to each message, based on the
occurance of tokens (words, and other message properties) it finds in
the message. Probabilities near 0 mean that there were strong indicators
of ham in the message, and few or no indicators of spam. Probabilities
near 1 mean there were strong indicators of spam.

If you get a contradictory Bayes score for a message, it's a good sign
that you might need to better train your Bayes database with more/better
examples of ham and spam.

Still one of the best introductory discussions on the subject:
http://www.paulgraham.com/spam.html

- Ryan

-- 
  Ryan Thompson <ry...@sasknow.com>

  SaskNow Technologies - http://www.sasknow.com
  901-1st Avenue North - Saskatoon, SK - S7K 1Y4

        Tel: 306-664-3600   Fax: 306-244-7037   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America

Re: Can bayes lower a score?

Posted by "Scot L. Harris" <we...@cfl.rr.com>.
On Thu, 2004-07-15 at 13:08, Matt Kettler wrote:

> 
> Scoring wise bayes works like any other rule, it assigns the score given to 
> it in 50_scores.cf.
> 
> Bayes scores under 50 generally indicate likelihood of nonspam, over 50 
> indicates likelihood of spam. The bayes probability score is based on your 
> past training. How many SpamAssassin points that bayes probability gets is 
> fixed:
> 
> grep BAYES_ /usr/share/spamassassin/50_scores.cf
> 
> score BAYES_00 0 0 -4.901 -4.900
> score BAYES_01 0 0 -0.600 -1.524
> score BAYES_10 0 0 -0.734 -0.908
> score BAYES_20 0 0 -0.127 -1.428

Thanks everyone for clarifying this for me.  I thought that was the way
it worked but wanted to make sure.


-- 
Scot L. Harris
webid@cfl.rr.com

[Crash programs] fail because they are based on the theory that, with nine
women pregnant, you can get a baby a month.
		-- Wernher von Braun 


Re: Can bayes lower a score?

Posted by Matt Kettler <mk...@evi-inc.com>.
At 12:48 PM 7/15/2004, Scot L. Harris wrote:
>Is it possible for bayes to add a negative score to a message?
>
>Had a message passed to me that scored 4.1.  The rules it hit on was one
>that adds 5.0 that I wrote and bayes_20.  No other rules seemed to have
>hit on this particular message.
>
>When I tried running the message through by hand it scored 6.1 but with
>bayes_99 that time.  I think this was due to an sa-learn session having
>been run that morning so the bayes database was different on this run
>from when the message was received.
>
>My assumption is that bayes can apply a negative score if the message
>matches ham it has learned in the past.  Hopefully someone can confirm
>this or inform me how it really works.

Scoring wise bayes works like any other rule, it assigns the score given to 
it in 50_scores.cf.

Bayes scores under 50 generally indicate likelihood of nonspam, over 50 
indicates likelihood of spam. The bayes probability score is based on your 
past training. How many SpamAssassin points that bayes probability gets is 
fixed:

grep BAYES_ /usr/share/spamassassin/50_scores.cf

score BAYES_00 0 0 -4.901 -4.900
score BAYES_01 0 0 -0.600 -1.524
score BAYES_10 0 0 -0.734 -0.908
score BAYES_20 0 0 -0.127 -1.428
score BAYES_30 0 0 -0.349 -0.904
score BAYES_40 0 0 -0.001 -0.001
score BAYES_44 0 0 -0.001 -0.001
score BAYES_50 0 0 0.001 0.001
score BAYES_56 0 0 0.001 0.001
score BAYES_60 0 0 1.789 1.592
score BAYES_70 0 0 2.142 2.255
score BAYES_80 0 0 2.442 1.657
score BAYES_90 0 0 2.454 2.101
score BAYES_99 0 0 5.400 5.400

As you can see, bayes can subtract up to 4.901 points, or add up to 5.400.