[cvs] bogofilter/src bogotune.c,1.59,1.60
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <re...@us...> - 2003-12-01 14:58:10
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1:/tmp/cvs-serv15474 Modified Files: bogotune.c Log Message: Rename get_thresh() to set_thresh(). Index: bogotune.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/bogotune.c,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- bogotune.c 1 Dec 2003 14:36:17 -0000 1.59 +++ bogotune.c 1 Dec 2003 14:58:05 -0000 1.60 @@ -76,8 +76,8 @@ #define MAX_THR_PCT 0.0050 /* maximum threshold percent */ #define HAM_CUTOFF 0.10 -#define MIN_CUTOFF 0.55 /* minimum cutoff for get_thresh() */ -#define MAX_CUTOFF 0.99 /* maximum cutoff for get_thresh() */ +#define MIN_CUTOFF 0.55 /* minimum cutoff for set_thresh() */ +#define MAX_CUTOFF 0.99 /* maximum cutoff for set_thresh() */ #define SPAM_CUTOFF 0.95 #define FP_CUTOFF 0.999 @@ -466,7 +466,7 @@ ** 2) initial minimum target increases from 5 to 10 */ -static void get_thresh(uint count, double *scores) +static void set_thresh(uint count, double *scores) { uint ftarget = 0; uint mtarget = scale(count, TEST_COUNT, PREF_COUNT, 3, 10); @@ -1178,7 +1178,8 @@ min_dev = 0.02; - get_thresh(ns_cnt, ns_scores); + /* set target and spam_cutoff */ + set_thresh(ns_cnt, ns_scores); printf("False-positive target is %d (cutoff %8.6f)\n", target, spam_cutoff); #ifdef TEST |