You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming I have hourly data from 2022-01-01 to 2022-12-31. I want to train on 9 months of data (2022-01-01 to 2022-08-31) and do a historical backtest on the last 3 months of data (2022-09-01 to 2022-12-31). If I retrain every day on the past 90 days of data (retrain = True, stride = 24, train_length = 2160) and have a forecast horizon of 24, i.e. 24 hours, how would I include refitting my scaler as my training set changes for every iteration of the historical forecast method? Is there some sort of params I can call?
Currently, I am initialising my scaler via the method below.
scaler = MinMaxScaler()
target_transformer = Scaler(scaler)
future_cov_transformer = Scaler(scaler)
target_series_fit_scaled = target_transformer.fit_transform(target_series_fit) #target_series_fit contains data from 2022-09-01 to 2022-12-31
future_cov_fit_scaled = future_cov_transformer.fit_transform(future_cov_fit)
target_series_sample_scaled = target_transformer.transform(target_series_sample) #target_series_sample contains data from 2022-09-01 to 2022-12-31
future_cov_sample_scaled = future_cov_transformer.transform(future_cov_sample)
Currently when I do the historical forecast, I first fit the model on target_series_fit_scaled and future_cov_fit_scaled then pass target_series_sample_scaled and future_cov_sample_scaled to the historical forecast method. However, this does not include refitting of the scaler as the training set changes.
At the moment historical_forecasts/backtest do not accept data transformer and the series is used as is to train the model (with the associated information leakage if the series are scaled), there is no argument to change this.
The feature request is already tracked by #1540 and the PR #2021 started to implement it, I am going to close this issue to limit duplicates.
Hi, I just wanted to check if the feature has already been implemented and is live? I see in the PR that there is still some conflicts so I assume it is not fully completed yet?
Hi,
Assuming I have hourly data from 2022-01-01 to 2022-12-31. I want to train on 9 months of data (2022-01-01 to 2022-08-31) and do a historical backtest on the last 3 months of data (2022-09-01 to 2022-12-31). If I retrain every day on the past 90 days of data (
retrain = True, stride = 24, train_length = 2160
) and have a forecast horizon of 24, i.e. 24 hours, how would I include refitting my scaler as my training set changes for every iteration of the historical forecast method? Is there some sort of params I can call?Currently, I am initialising my scaler via the method below.
Currently when I do the historical forecast, I first fit the model on target_series_fit_scaled and future_cov_fit_scaled then pass target_series_sample_scaled and future_cov_sample_scaled to the historical forecast method. However, this does not include refitting of the scaler as the training set changes.
The text was updated successfully, but these errors were encountered: