Skip to content

How to get the forecasted data without using all the historical data with DeepAr? For applications that involve databases #2520

Answered by Msaleh87
Msaleh87 asked this question in Q&A
Discussion options

You must be logged in to vote

When using the predictor.predict function, you need to update the training data input to it, if you are using feat_dynamic_real.

The reason is the predict function expects the future features inside feat_dynamic_real to be able to predict. Therefore, the code should be as follows:
The key is how to setup the training dataset


training_data = ListDataset([{"start": df_input.index[0],
                              "target": df_input.Load[:Threshold],
                              'feat_dynamic_real': [time_feat_df_5min_ready.DofW[:Threshold]], 
                              'time_feat': [time_feat_df_5min_ready.DayofWeek[:Threshold], # doesn't have time as an index
                         …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Msaleh87
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant