comparison scripts/CalcPropNist.py @ 98:f3f4fee77a25

merge
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Thu, 11 Feb 2010 16:36:30 -0500
parents 2d671ab3b730
children
comparison
equal deleted inserted replaced
97:b3d15100842a 98:f3f4fee77a25
49 elif classe < 36: 49 elif classe < 36:
50 test_maj += 1 50 test_maj += 1
51 elif classe < 62: 51 elif classe < 62:
52 test_min += 1 52 test_min += 1
53 print "Train set:",len(train),"\nchiffres:",float(train_c)/len(train),"\tmajuscules:",\ 53 print "Train set:",len(train),"\nchiffres:",float(train_c)/len(train),"\tmajuscules:",\
54 float(train_maj)/len(train),"\tminuscules:",float(train_min)/len(train) 54 float(train_maj)/len(train),"\tminuscules:",float(train_min)/len(train),\
55 "\nchiffres:", float(train_c)/len(train),"\tlettres:",float(train_maj+train_min)/len(train)
55 56
56 print "\nTest set:",len(test),"\nchiffres:",float(test_c)/len(test),"\tmajuscules:",\ 57 print "\nTest set:",len(test),"\nchiffres:",float(test_c)/len(test),"\tmajuscules:",\
57 float(test_maj)/len(test),"\tminuscules:",float(test_min)/len(test) 58 float(test_maj)/len(test),"\tminuscules:",float(test_min)/len(test),\
59 "\nchiffres:", float(test_c)/len(test),"\tlettres:",float(test_maj+test_min)/len(test)
60
58 61
59 if test_maj+test_min+test_c != len(test): 62 if test_maj+test_min+test_c != len(test):
60 print "probleme avec le test, des donnees ne sont pas etiquetees" 63 print "probleme avec le test, des donnees ne sont pas etiquetees"
61 64
62 if train_maj+train_min+train_c != len(train): 65 if train_maj+train_min+train_c != len(train):