From 7706cf5bb4e7e0b43fdd194889b1ba382b3d698a Mon Sep 17 00:00:00 2001 From: Micah Smith Date: Tue, 17 Apr 2018 17:54:20 -0400 Subject: [PATCH 1/2] Add bob's feature --- dengue_prediction/features/contrib/user_bob.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 dengue_prediction/features/contrib/user_bob.py diff --git a/dengue_prediction/features/contrib/user_bob.py b/dengue_prediction/features/contrib/user_bob.py new file mode 100644 index 0000000..0854d1a --- /dev/null +++ b/dengue_prediction/features/contrib/user_bob.py @@ -0,0 +1,12 @@ +from fhub_transformers.missing import LagImputer +from fhub_transformers.ts import SingleLagger +from sklearn.preprocessing import Imputer + +groupby_kwargs = {'level': ['city', 'weekofyear']} + +input = 'reanalysis_max_air_temp_k' +transformer = [ + LagImputer(groupby_kwargs=groupby_kwargs), + SingleLagger(2, groupby_kwargs=groupby_kwargs), + Imputer(), +] From ed2b268f91f541997ca9bf25bee50e37a96810c2 Mon Sep 17 00:00:00 2001 From: Micah Smith Date: Tue, 17 Apr 2018 17:54:20 -0400 Subject: [PATCH 2/2] Add bob's feature --- dengue_prediction/features/contrib/user_bob.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 dengue_prediction/features/contrib/user_bob.py diff --git a/dengue_prediction/features/contrib/user_bob.py b/dengue_prediction/features/contrib/user_bob.py new file mode 100644 index 0000000..0854d1a --- /dev/null +++ b/dengue_prediction/features/contrib/user_bob.py @@ -0,0 +1,12 @@ +from fhub_transformers.missing import LagImputer +from fhub_transformers.ts import SingleLagger +from sklearn.preprocessing import Imputer + +groupby_kwargs = {'level': ['city', 'weekofyear']} + +input = 'reanalysis_max_air_temp_k' +transformer = [ + LagImputer(groupby_kwargs=groupby_kwargs), + SingleLagger(2, groupby_kwargs=groupby_kwargs), + Imputer(), +]