python - TimeSeriesDataSet类的group_ids参数在PyTorch Forecasting中具体有什么作用?

标签 python pytorch time-series forecasting

我目前正在使用 PyTorch 预测,我想使用 TimeSeriesDataSet 创建数据集。我的原始数据位于 pandas Dataframe 中,如下所示:

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

所以我总共在“位置”中获得了九个不同的唯一值以及每个日期每个位置的金额。现在我想知道 TimeSeriesDataSet 类的 group_ids 参数是做什么的,它的确切行为是什么?我并没有真正理解基于 documentation 的想法.

提前致谢!

最佳答案

时间序列数据集通常包含不同实体/个人的多个时间序列。

group_ids是唯一确定具有关联时间序列的实体的列列表。在您的示例中,它将是 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.

关于python - TimeSeriesDataSet类的group_ids参数在PyTorch Forecasting中具体有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68211994/

相关文章:

python - 读取 lob 时出现 cx_Oracle MemoryError

python-3.x - PyTorch 不能使用 float 类型,只能使用 long

deep-learning - 如何创建具有混合分类和连续矩阵输入的 Pytorch 网络

python - 如何在 TensorFlow while_loop 中赋值

python - 使用Python将信息存储在MySQL数据库中

python - 当该依赖项是 numpy/scipy/...(其他一些)时,pip install 没有正确处理依赖项?

python - 如何更好地处理数据并设置神经网络参数?

python - ValueError : not enough values to unpack (expected 3, 在 Pytorch 中得到 2)

excel - R:反转时间序列对象中的数据

mysql - 最优时间序列表示