[Spambayes] Re: caching stuff

Tim Stone - Four Stones Expressions tim@fourstonesExpressions.com
Fri Nov 22 23:02:42 2002

11/22/2002 3:51:16 PM, "T. Alexander Popiel" <popiel@wolfskeep.com> wrote:

>In message:  <621ZJEWSC7YV2YB6GAPJPJNLZX7454IG.3dde9f4f@riven>
>             <tim@fourstonesExpressions.com> writes:
>>Well, if the baseian prob changes even if the ham and spam ratios don't, 
>>of course the caching scheme is bad.  But I certainly don't see that in the 
>>code that I changed.  Maybe I'm looking in the wrong place...
>In the probability computation (which I'm reading from
>update_probabilities in an old image):
>        prob = spamratio / (hamratio + spamratio)
>        n = hamcount + spamcount
>        prob = (StimesX + n * prob) / (S + n)
>Here we see that prob is based on both the ratios and the
>raw counts; thus, they're also based on nham & nspam
>(because to get the same non-zero ratio, you'd have to
>have a different raw count).

I get it now... the larger the raw counts, the more weight is given to this 

So my cache mechanism is fatally flawed.

- TimS
>There's normally a hulking huge comment in the middle of
>the code snippet above - that may be making it harder to
>- Alex
- Tim

More information about the Spambayes mailing list