Created
February 23, 2018 11:47
-
-
Save StevenReitsma/8fb073640b43834df025f7d1272838a1 to your computer and use it in GitHub Desktop.
Blogpost-Heineken6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bdranalytics.pandaspipeline.transformers import PdFeatureChain | |
pipeline_pd = PdFeatureChain([ | |
('wna', WeekNumberAdder(datecol='date')), | |
('svc', SmoothedVarCreator(var='weekly_sales', groupby_keys=['store', 'dept'], alpha_list=[0.1, 0.3])), | |
('lc1', LagCreator(groupby_keys=['store', 'dept', 'weeknumber'], lagdict=lagdict_yearly, drop_cols=False, suffix='ly')), | |
('lc2', LagCreator(groupby_keys=['store', 'dept'], lagdict=lagdict)) | |
]) | |
df_features = pipeline_pd.transform(df_base).dropna() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment