diff TrainingScoreManager.h @ 34:3af380769779

small fixes, logging now sensible.
author Robert Tubb <rt300@eecs.qmul.ac.uk>
date Wed, 26 Nov 2014 14:04:05 +0000
parents 75202498bee9
children 3b10a26da293
line wrap: on
line diff
--- a/TrainingScoreManager.h	Tue Nov 25 18:37:54 2014 +0000
+++ b/TrainingScoreManager.h	Wed Nov 26 14:04:05 2014 +0000
@@ -128,7 +128,10 @@
         details.push_back(result.score); // 10 x throughput
         
         eventLogger.logEvent(TRAINING_RESULT, details);
-        
+        details.clear();
+        details.insert(details.begin(), targetParams.begin(), targetParams.end());
+        details.insert(details.end(), answer.begin(), answer.end());
+        eventLogger.logEvent(TARGET_AND_MATCH, details);
         
         return result;
     }
@@ -150,22 +153,7 @@
         cout << "TP:  " << TP << endl;
         return TP;
     }
-    float euclideanDistance(vector<int> v1, vector<int> v2) const{
-        if (v1.size() != v2.size()){
-            cout << "ERROR ERROR: vectors must be same length for Mr Euclid";
-            return 0.;
-        }
-        vector<float> diff;
-        
-        std::transform(v1.begin(), v1.end(), v2.begin(), v1.begin(), difference<float>());
-        // sqr diff
-        
-        std::transform(v1.begin(), v1.end(), v1.begin(),squared<float>());
-        float ans = std::accumulate(v1.begin(),v1.end(),0.0);
-        
-        return sqrt(ans);
-        
-    };
+
     int totalScored;
     
 };