GluonTS学习指南

GluonTS对数据集有一些基本要求

https://zhuanlan.zhihu.com/p/446526004

  • 数据集必须是时间序列,也就是说至少是一个可迭代对象 - 每条数据至少有一个target域,这个域中存放的是时间序列的具体值 - 数据集至少有一个start域,这个域指定了时间序列的开始时间

  • 可选域 - 通常给出一些可用的协变量:

feat_static_cat:时不变类别协变量,例如温度预测时,每个城市的所处温带就是一类时不变类别协变量
feat_static_real:时不变连续协变量,例如做温度预测时,每个城市的经纬度就是一类时不变连续协变量
feat_dynamic_cat:时变类别协变量,例如温度预测时,每天的天气信息就是一种时变类别协变量
feat_dynamic_real:时变连续协变量,例如温度预测时,每个城市每日的汽车尾气排放量就是一种时变连续协变量

Must be a valid Pandas frequency.指的是什么?

A number of string aliases are given to useful common time series frequencies. We will refer to these aliases as offset aliases.

Alias Description
B business day frequency
C custom business day frequency
D calendar day frequency
W weekly frequency
M month end frequency
SM semi-month end frequency (15th and end of month)
BM business month end frequency
CBM custom business month end frequency
MS month start frequency
SMS semi-month start frequency (1st and 15th)
BMS business month start frequency
CBMS custom business month start frequency
Q quarter end frequency
BQ business quarter end frequency
QS quarter start frequency
BQS business quarter start frequency
A, Y year end frequency
BA, BY business year end frequency
AS, YS year start frequency
BAS, BYS business year start frequency
BH business hour frequency
H hourly frequency
T, min minutely frequency
S secondly frequency
L, ms milliseconds
U, us microseconds
N nanoseconds

参考下面的例子

https://blog.csdn.net/qq_34461600/article/details/103005723
例子讲解很详细,但是有个问题
数据间隔是5分钟,不能设置成间隔1个小时
start是自己设置的时间,不一定是真实的时间

官网上的例子是合理的:
https://aws.amazon.com/cn/blogs/china/gluon-time-series-open-source-time-series-modeling-toolkit/

修改DeepAR的参数

https://zhuanlan.zhihu.com/p/446529142
下面我们建立模型,DeepAR中通常使用LSTM作为cell,这里我们用2层LSTM作为基底建立DeepAR模型,训练8个周期,每个周期迭代50步;其余的参数,例如初始化、learning rate和learning rate decay均采用默认值

你可能感兴趣的:(python,人工智能,GluonTS,时间序列预测)