[Spambayes-checkins] spambayes Options.py,1.11,1.12
timtest.py,1.22,1.23
Tim Peters
tim_one@users.sourceforge.net
Thu, 12 Sep 2002 17:27:58 -0700
Update of /cvsroot/spambayes/spambayes
In directory usw-pr-cvs1:/tmp/cvs-serv25548
Modified Files:
Options.py timtest.py
Log Message:
Incompatible change: show_best_discriminators has changed from a bool
option to an int option, now giving the number of best discriminators
to show. Set to 0 if you don't want to see any.
Index: Options.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/Options.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** Options.py 13 Sep 2002 00:14:18 -0000 1.11
--- Options.py 13 Sep 2002 00:27:55 -0000 1.12
***************
*** 73,77 ****
show_false_positives: True
show_false_negatives: False
! show_best_discriminators: True
# The maximum # of characters to display for a msg displayed due to the
--- 73,84 ----
show_false_positives: True
show_false_negatives: False
!
! # Near the end of Driver.test(), you can get a listing of the "best
! # discriminators" in the words from the training sets. These are the
! # words whose WordInfo.killcount values are highest, meaning they most
! # often were among the most extreme clues spamprob() found. The number
! # of best discriminators to show is given by show_best_discriminators;
! # set this <= 0 to suppress showing any of the best discriminators.
! show_best_discriminators: 30
# The maximum # of characters to display for a msg displayed due to the
***************
*** 121,125 ****
'show_false_negatives': boolean_cracker,
'show_histograms': boolean_cracker,
! 'show_best_discriminators': boolean_cracker,
'save_trained_pickles': boolean_cracker,
'pickle_basename': string_cracker,
--- 128,132 ----
'show_false_negatives': boolean_cracker,
'show_histograms': boolean_cracker,
! 'show_best_discriminators': int_cracker,
'save_trained_pickles': boolean_cracker,
'pickle_basename': string_cracker,
Index: timtest.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/timtest.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** timtest.py 12 Sep 2002 02:58:02 -0000 1.22
--- timtest.py 13 Sep 2002 00:27:55 -0000 1.23
***************
*** 238,245 ****
printmsg(e, prob, clues)
! if options.show_best_discriminators:
print
print " best discriminators:"
! stats = [(-1, None) for i in range(30)]
smallest_killcount = -1
for w, r in c.wordinfo.iteritems():
--- 238,245 ----
printmsg(e, prob, clues)
! if options.show_best_discriminators > 0:
print
print " best discriminators:"
! stats = [(-1, None)] * options.show_best_discriminators
smallest_killcount = -1
for w, r in c.wordinfo.iteritems():