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

Private GIT Repository
The module to generate the y variable is now created
[predictops.git] / predictops / engine.py
index 8ba5043ebfdec4ef386aef2cf223b7cb52407d0a..dedd2652cdd9efc97eaf24d26c1d3bd66a1398ec 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 .target.target import Target
 
 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
 logger = getLogger()
 
 fileConfig((Path.cwd() / 'config') / 'logging.cfg')
 logger = getLogger()
@@ -26,7 +27,6 @@ class Engine:
                                    self._config['DATETIME'].getfloat('hourStep'))
 
         self._X = {}
                                    self._config['DATETIME'].getfloat('hourStep'))
 
         self._X = {}
-        self._Y = {}
 
 
 
 
 
 
@@ -65,10 +65,25 @@ class Engine:
                 self._X.setdefault(date,{}).update(dated_features[date])
 
 
                 self._X.setdefault(date,{}).update(dated_features[date])
 
 
+    def add_target(self):
+        self._target = Target(config_file = eval(self._config['TARGET']['config']),
+                              start = self._start, end = self._end,
+                              timestep = self._timestep)
+
+
     @property
     def X(self):
         return self._X
 
     @X.setter
     def X(self, x):
     @property
     def X(self):
         return self._X
 
     @X.setter
     def X(self, x):
-        self._X = x
\ No newline at end of file
+        self._X = x
+
+
+    @property
+    def y(self):
+        return self._target.y
+
+    @y.setter
+    def end(self, y):
+        self._target.y = y