svn commit: r587839 - /spamassassin/branches/bug-5293-pluginized-bayes/masses/bayes-testing/bayes-10pcv-driver Author: jm
Date: Wed Oct 24 02:54:59 2007
New Revision: 587839

URL: http://svn.apache.org/viewvc?rev=587839&view=rev
Log:
bayes 10fold cross validation driver: ensure we take a (gzipped) copy of Bayes DBs and the test mboxes, so that FPs and FNs can be reproduced later after the test finishes

Modified:
    spamassassin/branches/bug-5293-pluginized-bayes/masses/bayes-testing/bayes-10pcv-driver

Modified: spamassassin/branches/bug-5293-pluginized-bayes/masses/bayes-testing/bayes-10pcv-driver
URL: http://svn.apache.org/viewvc/spamassassin/branches/bug-5293-pluginized-bayes/masses/bayes-testing/bayes-10pcv-driver?rev=587839&r1=587838&r2=587839&view=diff
==============================================================================
--- spamassassin/branches/bug-5293-pluginized-bayes/masses/bayes-testing/bayes-10pcv-driver (original)
+++ spamassassin/branches/bug-5293-pluginized-bayes/masses/bayes-testing/bayes-10pcv-driver Wed Oct 24 02:54:59 2007
@@ -166,6 +166,9 @@
 
   time sa-learn --sync --config-file=$tmpdir/rules
 
+  # take a copy of the trained Bayes DBs, gzipped
+  ( cd $tmpdir ; tar cf - dbs | gzip -c > $rdir/dbs.tgz )
+
   if [ $INTERLEAVE_TESTS = 1 ] ; then
     # now split the ham and spam test bucket into 10 sub-buckets,
     # so we interleave ham and spam while testing. important for
@@ -220,7 +223,10 @@
 	> $rdir/thresholds.static
 
   # remove these, they're too big.
-  rm -f $rdir/hbucketlearn $rdir/sbucketlearn $rdir/hbuckettest $rdir/sbuckettest
+  rm -f $rdir/hbucketlearn $rdir/sbucketlearn
+
+  # but keep these to find FPs/FNs later
+  gzip $rdir/hbuckettest $rdir/sbuckettest
 
 done
 echo -n "Done test..." ; date
@@ -238,7 +244,7 @@
 	> $results/thresholds_all
 ./bayes-testing/bayes-static-thresholds \\
 	$results/spam_all.log $results/nonspam_all.log \\
-	> $results/thresholds.static
+	> $results/thresholds_all.static
 
 echo "Done."
 ls -l $results


