Bug in tuning.sh? (was: Understanding tuning results)

Greg Louis glouis at dynamicro.on.ca
Thu Jun 12 17:03:20 CEST 2003


On 20030612 (Thu) at 1626:05 +0200, Boris 'pi' Piwinger wrote:
> Boris 'pi' Piwinger wrote:
> 
> > Again, robs is not siginificant at all. That cannot be
> > correct. Is anybody else seeing that?
> 
> I don't understand anything in tuning.sh, but the following
> makes me wonder:
> 

> getco $md 0.10 $rs r0.ns.mc r1.ns.mc r2.ns.mc
Good catch.  That should be

getco $md,$rs 0.1 r0.ns.mc r1.ns.mc r2.ns.mc

with current bogofilter.

> So there is a fixed 0.10! I would expects both optional
> values next to each other.
> 

The purpose of getco is to get the cutoff required for a given target
number of false positives.  The way it works is

Evaluate the nonspams with a cutoff of 0.10 so that most will be
treated as spam.

Sort the differences of those scores from 1 (which is how they are
printed by bogofilter).

Take the score that is $target values down from the top of that list;
if it's less than 0.000001, move down the list till we find one that
isn't.

Subtract that from 1 and return it as the cutoff to use when evaluating
spam.

> Then the function:
> 
> function getco () {
>     opts="-m$1 -o$2"
>     shift ; shift ; shift

Bogus.  should be only 2 shifts.

>     res=`cat $* | bogofilter -t -c $CFG $opts -v 2>&1
> [...]
> 
> So md (min_dev) is set as min_dev, *nothing* is set for
> robs. Further, 0.1 is set as spam_cutoff. rs (robs) is used
> as a file?
> 
> Should the above line read as follows:
> opts="-m$1,$3 -o$2"

That would work too (leaving the 3 shifts) but the other is, I think,
more readable.

> And why a fixed value for spam_cutoff that low? Why in that
> order?

I've explained the fixed value earlier in this message.

I wrote the first version of this script, but I wrote it to work with a
customized bogofilter of my own.  David (I think) was the one who
converted it to run with mainstream bogofilter, and it looks as if a
couple of typos escaped him.  Not fair to blame him when he isn't
around to reply, so I hasten to add that I wasn't overly liberal with
comments, since I didn't originally intend to publish that thing.  Pity
I didn't review the published version, sorry.  I still haven't reviewed
it, preferring to concentrate on the new bogotune.

-- 
| G r e g  L o u i s          | gpg public key: finger     |
|   http://www.bgl.nu/~glouis |   glouis at consultronics.com |
| http://wecanstopspam.org in signatures fights junk email |




More information about the Bogofilter mailing list