[Spambayes-checkins] spambayes TestDriver.py,1.28,1.29

Rob W.W. Hooft hooft@users.sourceforge.net
Fri Nov 15 21:32:22 2002


Update of /cvsroot/spambayes/spambayes
In directory usw-pr-cvs1:/tmp/cvs-serv9245

Modified Files:
	TestDriver.py 
Log Message:
use CostCounter

Index: TestDriver.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/TestDriver.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** TestDriver.py	7 Nov 2002 22:30:04 -0000	1.28
--- TestDriver.py	15 Nov 2002 21:32:19 -0000	1.29
***************
*** 131,134 ****
--- 131,135 ----
      print guts
  
+ 
  class Driver:
  
***************
*** 141,144 ****
--- 142,147 ----
          self.ntimes_finishtest_called = 0
          self.new_classifier()
+         import CostCounter
+         self.cc=CostCounter.default()
  
      def new_classifier(self):
***************
*** 204,207 ****
--- 207,211 ----
                nfn * options.best_cutoff_fn_weight +
                nun * options.best_cutoff_unsure_weight)
+         print self.cc
  
          if options.save_histogram_pickles:
***************
*** 223,226 ****
--- 227,231 ----
                                 hi=options.show_ham_hi):
              local_ham_hist.add(prob * 100.0)
+             self.cc.ham(prob)
              if lo <= prob <= hi:
                  print
***************
*** 232,235 ****
--- 237,241 ----
                                  hi=options.show_spam_hi):
              local_spam_hist.add(prob * 100.0)
+             self.cc.spam(prob)
              if lo <= prob <= hi:
                  print





More information about the Spambayes-checkins mailing list