X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/predictops.git/blobdiff_plain/fbeb0a86f1d3efc96263a81981b0a059d93fa4f5..661ece8c54b20d4c559e5f73616cc213f8c4f6b7:/predictops/engine.py?ds=inline diff --git a/predictops/engine.py b/predictops/engine.py index 44ab9c4..f87e82e 100644 --- a/predictops/engine.py +++ b/predictops/engine.py @@ -7,6 +7,7 @@ from shutil import rmtree 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 @@ -73,12 +74,16 @@ class Engine: 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):