-class Engine:
- def __init__(self, start = None, end = None, time_step = None):
- logger.info("Predictops engine launched")
- self._X = {}
- self._Y = {}
-
-
- def clean(self):
- # Cleaning the data directory
- logger.info("Cleaning and restoring data directory")
- directory = Path.cwd() / 'data'
- if directory.is_dir():
- rmtree(directory)
- p = Path(Path.cwd() / 'data')
- p.mkdir()
-
-
- def add_feature(self, name, **kw):
-
- if name == 'meteofrance':
- meteofeature = MeteoFrance(**kw)
- meteofeature.update()
- dated_features = meteofeature.dated_features
- for date in dated_features:
- self._X.setdefault(date,{}).update(dated_features[date])
- elif name == 'ephemeris':
- ephemerides = Ephemeris(**kw)
- dated_features = ephemerides.dated_features
- for date in dated_features:
- self._X.setdefault(date,{}).update(dated_features[date])
-
-
- @property
- def X(self):
- return self._X