Created
November 25, 2021 15:01
-
-
Save bkaankuguoglu/f5546dc0a98acacdcecd560a012664b6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
df_forecast['value'] = 0 | |
df_forecast= (df_forecast | |
.assign(hour = df_forecast.index.hour) | |
.assign(day = df_forecast.index.day) | |
.assign(month = df_forecast.index.month) | |
.assign(day_of_week = df_forecast.index.dayofweek) | |
.assign(week_of_year = df_forecast.index.week) | |
) | |
df_forecast = onehot_encode_pd(df_forecast, ['month','day','day_of_week','week_of_year']) | |
df_forecast = generate_cyclical_features(df_forecast, 'hour', 24, 0) | |
df_forecast = add_holiday_col(df_forecast, us_holidays) | |
df_forecast[list(set(X_train.columns)-set(df_forecast.columns))] = 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment