3

I am currently working with PyTorch Forecasting and I want to create dataset with TimeSeriesDataSet. My original data lies in a pandas Dataframe and looks like this:

date         amount        location 
2014-01-01     5               A
2014-01-01     7               B
    ...       ...             ...
2017-12-30     4               H
2017-12-31     8               I

So in total I got nine different unique values in "location" and an amount for each location per date. Now I am wondering what the group_ids parameter for the TimeSeriesDataSet class does and what it exact behaviour is? I am not really getting the idea based on the documentation.

Thanks a lot in advance!

1 Answer 1

2

A time-series dataset usually contains multiple time-series for different entities/individuals.

group_ids is a list of columns which uniquely determine entities with associated time series. In your example it would be location:

group_ids (List[str]) – list of column names identifying a time series. This means that the group_ids identify a sample together with the time_idx. If you have only one timeseries, set this to the name of column that is constant.

4
  • Can you please explain what "uniquely determine entities with associated time series" mean? I don't understand
    – lalaland
    Oct 18, 2021 at 15:37
  • @lalaland the row's key, in database language. In inventory data, it might be product ID. In personal data it might be name, surname, and date of birth.
    – iacob
    Oct 18, 2021 at 15:41
  • I see thanks. for the history of electricity consumption can it be the location? does that make sense?
    – lalaland
    Oct 18, 2021 at 16:53
  • @lalaland if there's only one row/time series per location, then yes.
    – iacob
    Oct 18, 2021 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.