[Spambayes] Saving Hist

Brad Clements bkc@murkworks.com
Mon, 23 Sep 2002 17:58:40 -0400


I want to use gnu plot to plot histograms of global histograms, so ..

I'd like to check in these changes:


Index: TestDriver.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/TestDriver.py,v
retrieving revision 1.7
diff -r1.7 TestDriver.py
160a161,168
> 
>         if options.save_histogram_pickles:
>             for f,h in (('ham',self.global_ham_hist),('spam',self.global_spam_hist)):
>                 fname = "%s%s.pik" % (options.pickle_basename,f)
>                 print "    saving %s histogram pickle to %s" %(f, fname)
>                 fp = file(fname, 'wb')
>                 pickle.dump(h, fp, 1)
>                 fp.close()


Index: Options.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Options.py,v
retrieving revision 1.23
diff -r1.23 Options.py
137a138,142
> 
> # if save_histogram_pickles is true, Driver.train() saves a binary
> # pickle of the spam and ham histogram for "all test runs". The file
> # basename is given by pickle_basename, the suffix _spamhist.pik
> # or _hamhist_pik is appended  to the basename.
140c145,146
< pickle_basename: class
---
> pickle_basename: class
> save_histogram_pickles: False
208a215
>                    'save_histogram_pickles': boolean_cracker,



Brad Clements,                bkc@murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
AOL-IM: BKClements