AssertionError: Dataframe index is not uniformly spaced. If your dataframe contains data from multiple series in the same column ("long" format), consider constructing the dataset with PandasDataset.from_long_dataframe
instead.
#2852
Replies: 2 comments
-
my data is missing dates, and this is fine for my use case; the |
Beta Was this translation helpful? Give feedback.
-
were you able to solve this issue? |
Beta Was this translation helpful? Give feedback.
-
Hi All, I am trying to use DeepAR estimator to multiple time series forecasting, by concatenating all the time series (Pandas DataFrame) and then use
train_ds = PandasDataset.from_long_dataframe(train_all_data, target='power', item_id=['product','Code'], datestamp = 'date', freq = 'D')
where train_all_date is the contanetation of 1000 time series (T1,T2, . . . T1000) as follows:
Similarly for T2, T3, . . . T1000. These time series all have different lengths (There are lots of common days though, with different, product type) and they have different start date but their frequency is the same.
Then train_all_data is the concatenation of these series vertically. I used the above commands with my estimator defined as follows here:
estimator = DeepAREstimator(freq='D', context_length=100, prediction_length=400, num_layers=3,hidden_size = 64)
Then following command
estimator.train(train_ds)
returns
AssertionError: Dataframe index is not uniformly spaced. If your dataframe contains data from multiple series in the same column ("long" format), consider constructing the dataset with
PandasDataset.from_long_dataframeinstead.
The combination of code and product uniquely identify a time series. May be the way I added item_id is not correct. Maybe more than one element for item_id is not supported. Can someone help here? (since product or code cannot uniquely identify a time series)
It is telling me to use the long format but I thought I am already using the long format. Can you guys help identifying and solving my problem
Beta Was this translation helpful? Give feedback.
All reactions