From db22045723799e17052068cc1619e8e88e3ce0da Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20Zbyszy=C5=84ski?= <m.zbyszynski@gold.ac.uk>
Date: Fri, 29 Sep 2017 12:26:14 +0100
Subject: [PATCH] small adjustment to includes

---
 src/machineLearning/machineLearning.cpp | 31 +++++++++++++++----------
 src/machineLearning/machineLearning.h   |  2 +-
 src/machineLearning/trainingData.h      |  2 +-
 3 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/src/machineLearning/machineLearning.cpp b/src/machineLearning/machineLearning.cpp
index 19f141f..7f5219d 100644
--- a/src/machineLearning/machineLearning.cpp
+++ b/src/machineLearning/machineLearning.cpp
@@ -10,6 +10,15 @@
 
 namespace rapidmix {
     
+    //////////////////////////////////////////////////////////////////////// Generic train
+    template <class MachineLearningModule>
+    bool machineLearning<MachineLearningModule>::train(const trainingData &newTrainingData) {
+        return MachineLearningModule::train(newTrainingData);
+    }
+
+    
+    /////////////////////////////////////////////////////////////////////// RapidLib specializations
+    
     void trainingData2rapidLib (const trainingData &newTrainingData, std::vector<trainingExample<double> > &trainingSet) {
         for (int h = 0; h < newTrainingData.trainingSet.size(); ++h) { //Go through every phrase
             
@@ -26,6 +35,7 @@ namespace rapidmix {
         }
     };
     
+    /////////////////////////////////////////////////////////////////////// RapidLib classification
     template<>
     bool machineLearning<classification<double>>::train(const trainingData &newTrainingData) {
         std::vector<trainingExample<double> > trainingSet;
@@ -37,6 +47,7 @@ namespace rapidmix {
         return classification::train(trainingSet);
     }
     
+    /////////////////////////////////////////////////////////////////////// RapidLib regression
     template<>
     bool machineLearning<regression<double> >::train(const trainingData &newTrainingData) {
         std::vector<trainingExample<double> > trainingSet;
@@ -44,6 +55,7 @@ namespace rapidmix {
         return regression::train(trainingSet);
     }
     
+    /////////////////////////////////////////////////////////////////////// RapidLib seriesClassification
     template<>
     bool machineLearning<seriesClassification<double> >::train(const trainingData &newTrainingData) {
         std::vector<trainingSeries<double> > seriesSet;
@@ -58,18 +70,6 @@ namespace rapidmix {
         return seriesClassification::train(seriesSet);
     }
     
-    template<>
-    bool machineLearning<rapidGVF>::train(const trainingData &newTrainingData) {
-        return rapidGVF::train(newTrainingData);
-    }
-    
-    
-    ///Generic train
-    template <class MachineLearningModule>
-    bool machineLearning<MachineLearningModule>::train(const trainingData &newTrainingData) {
-        return MachineLearningModule::train(newTrainingData);
-    }
-    
     template<>
     std::string machineLearning<classification<double> >::run(const std::vector<double> &inputVector, const std::string &label) {
         int classIndex = classification::run(inputVector)[0];
@@ -81,4 +81,11 @@ namespace rapidmix {
         return seriesClassification::run(inputSeries);
     }
     
+    
+    /////////////////////////////////////////////////////////////////////// GVF
+    template<>
+    bool machineLearning<rapidGVF>::train(const trainingData &newTrainingData) {
+        return rapidGVF::train(newTrainingData);
+    }
+    
 }
\ No newline at end of file
diff --git a/src/machineLearning/machineLearning.h b/src/machineLearning/machineLearning.h
index 97d6fd3..85875e1 100644
--- a/src/machineLearning/machineLearning.h
+++ b/src/machineLearning/machineLearning.h
@@ -10,7 +10,7 @@
 #ifndef machineLearning_h
 #define machineLearning_h
 
-#include "rapidMix.h"
+#include "../rapidMix.h"
 
 ////////// Include all of the machine learning algorithms here
 #include "classification.h"
diff --git a/src/machineLearning/trainingData.h b/src/machineLearning/trainingData.h
index e9c12eb..e1dcd9c 100644
--- a/src/machineLearning/trainingData.h
+++ b/src/machineLearning/trainingData.h
@@ -15,7 +15,7 @@
 #include <string>
 #include <unordered_map>
 
-#include "rapidMix.h"
+#include "../rapidMix.h"
 #include "json.h"
 
 namespace rapidmix {
-- 
GitLab