From a3cc2abef295b99990b24b1c822319c80a59ffe2 Mon Sep 17 00:00:00 2001 From: Christophe Guyeux Date: Tue, 11 Feb 2020 11:19:17 +0100 Subject: [PATCH] Bug fixed and starting to work on the target variable --- config/features/ephemeris_features.csv | 8 ++++++++ lib/source/meteofrance.py | 1 - lib/target/barracks.py | 0 main.py | 4 +++- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 config/features/ephemeris_features.csv create mode 100644 lib/target/barracks.py diff --git a/config/features/ephemeris_features.csv b/config/features/ephemeris_features.csv new file mode 100644 index 0000000..72060ef --- /dev/null +++ b/config/features/ephemeris_features.csv @@ -0,0 +1,8 @@ +name,type +hour,3 +dayInWeek,3 +dayInMonth,3 +dayInYear,3 +weekInYear,3 +month,3 +year,3 diff --git a/lib/source/meteofrance.py b/lib/source/meteofrance.py index c524089..88706ea 100644 --- a/lib/source/meteofrance.py +++ b/lib/source/meteofrance.py @@ -176,7 +176,6 @@ class MeteoFrance: remove(self._data_directory / 'historical' / todel) except: logger.warning(f"{self._data_directory / 'historical' / todel} not found") - system("touch "+todel) self._collect_historical_data() diff --git a/lib/target/barracks.py b/lib/target/barracks.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py index 6733216..a6a8d74 100644 --- a/main.py +++ b/main.py @@ -66,4 +66,6 @@ engine.add_feature(name = 'ephemeris', features = ['hour', 'dayInWeek', 'dayInMonth', 'dayInYear', 'weekInYear', 'month', 'year']) -print(engine.X) \ No newline at end of file + + +print(engine.X[datetime.strptime('06/30/2010 21:00:00', '%m/%d/%Y %H:%M:%S')]) \ No newline at end of file -- 2.39.5