Commits

Joe Kington committed 7504993

Added display of the number of "correctly" classified paws to build_eigenpaws

  • Participants
  • Parent commits ed9f277

Comments (0)

Files changed (1)

build_eigenpaws.py

     np.save('training_paw_data.npy', paw_data)
     np.save('training_paw_codes.npy', codes)
 
+    # Reload the classification data...
+    analysis.classify.load_data()
+
+    # Check to see how many of the training dataset paws were identified
+    matches = 0
+    for code, paw in zip(codes, paw_data):
+        pattern_result = analysis.PAW_CODE_LUT[code]
+        eigenpaw_result = analysis.classify(paw)
+        if eigenpaw_result == pattern_result:
+            matches += 1
+    print 'Classifed {0} of the {1} training paws correctly'.format(matches, codes.size)
+
 def make_training_dataset():
     paw_data, codes = [], []
     for run in data.measurements: