X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/predictops.git/blobdiff_plain/66b4627c14e9f89a2e5ab73bbf48819f8f3a1455..fbeb0a86f1d3efc96263a81981b0a059d93fa4f5:/predictops/engine.py?ds=inline diff --git a/predictops/engine.py b/predictops/engine.py index 2ec62df..44ab9c4 100644 --- a/predictops/engine.py +++ b/predictops/engine.py @@ -5,8 +5,10 @@ from logging.config import fileConfig from pathlib import Path from shutil import rmtree -from predictops.source.ephemeris import Ephemeris -from predictops.source.meteofrance import MeteoFrance +from .source.ephemeris import Ephemeris +from .source.meteofrance import MeteoFrance +from .learn.preprocessing import Preprocessing +from .target.target import Target fileConfig((Path.cwd() / 'config') / 'logging.cfg') logger = getLogger() @@ -26,7 +28,6 @@ class Engine: self._config['DATETIME'].getfloat('hourStep')) self._X = {} - self._Y = {} @@ -65,10 +66,33 @@ class Engine: 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) + + + def add_preprocessing(self): + process = Preprocessing(config_file = self._config, + dict_features = self.X, + dict_target = self.y) + print(process.dataframe.head(n=2)) + + + @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