]> AND Private Git Repository - predictops.git/blobdiff - predictops/engine.py
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Module cleaning
[predictops.git] / predictops / engine.py
index 44ab9c4c08bc089fd53038f5cd84fe0b4d557ef1..f87e82e833fbd87bcc091f4dc568108a9bf86a21 100644 (file)
@@ -7,6 +7,7 @@ from shutil import rmtree
 
 from .source.ephemeris import Ephemeris
 from .source.meteofrance import MeteoFrance
 
 from .source.ephemeris import Ephemeris
 from .source.meteofrance import MeteoFrance
+from .learn.learning import Learning
 from .learn.preprocessing import Preprocessing
 from .target.target import Target
 
 from .learn.preprocessing import Preprocessing
 from .target.target import Target
 
@@ -73,12 +74,16 @@ class Engine:
 
 
     def add_preprocessing(self):
 
 
     def add_preprocessing(self):
-        process = Preprocessing(config_file = self._config,
-                                dict_features = self.X,
-                                dict_target = self.y)
-        print(process.dataframe.head(n=2))
+        self._preproc = Preprocessing(config_file = self._config,
+                                      dict_features = self.X,
+                                      dict_target = self.y)
 
 
 
 
+    def learn(self):
+        history = self._config['HISTORY_KNOWLEDGE'].getint('nb_lines')
+        self._learner = Learning(config_file = eval(self._config['LEARNER']['config']),
+                                 X = self._preproc.dataframe, y = list(self.y.values())[history:])
+
 
     @property
     def X(self):
 
     @property
     def X(self):