[spambayes-dev] Bad spam & unsure stats in Outlook addin
tim.one at comcast.net
Thu Oct 2 13:36:35 EDT 2003
I noticed that the #spam and #unsure recorded by the Outlook addin were
always even, while the #ham was sometimes even and sometimes odd.
Paying closer attention, the #spam and #unsure reported are twice as big as
they should be.
This appears due to filter_message in Outlook2000/filter.py:
def filter_message(msg, mgr, all_actions=True):
prob = mgr.score(msg)
prob_perc = prob * 100
if prob_perc >= config.spam_threshold:
mgr.stats.num_spam += 1 HERE
elif prob_perc >= config.unsure_threshold:
mgr.stats.num_unsure += 1 HERE
That is, the start of the function reaches into mgt.stats and increments its
num_spam and num_unsure directly, while near the end of the function the
call to mgr.stats.RecordClassifiaction bumps them (indirectly) again.
Offhand I'm not sure which is the better place to do this -- but it probably
shouldn't be done both places <wink>.
More information about the spambayes-dev