changeset 95:2d671ab3b730

Rajout du calcul de la proportion de lettres (min+maj)
author SylvainPL <sylvain.pannetier.lebeuf@umontreal.ca>
date Thu, 11 Feb 2010 12:18:34 -0500
parents 1b8176e9892e
children f3f4fee77a25
files scripts/CalcPropNist.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/CalcPropNist.py	Thu Feb 11 11:55:03 2010 -0500
+++ b/scripts/CalcPropNist.py	Thu Feb 11 12:18:34 2010 -0500
@@ -51,10 +51,13 @@
     elif classe < 62:
         test_min += 1
 print "Train set:",len(train),"\nchiffres:",float(train_c)/len(train),"\tmajuscules:",\
-float(train_maj)/len(train),"\tminuscules:",float(train_min)/len(train)
+float(train_maj)/len(train),"\tminuscules:",float(train_min)/len(train),\
+"\nchiffres:", float(train_c)/len(train),"\tlettres:",float(train_maj+train_min)/len(train)
 
 print "\nTest set:",len(test),"\nchiffres:",float(test_c)/len(test),"\tmajuscules:",\
-float(test_maj)/len(test),"\tminuscules:",float(test_min)/len(test)
+float(test_maj)/len(test),"\tminuscules:",float(test_min)/len(test),\
+"\nchiffres:", float(test_c)/len(test),"\tlettres:",float(test_maj+test_min)/len(test)
+
 
 if test_maj+test_min+test_c != len(test):
     print "probleme avec le test, des donnees ne sont pas etiquetees"