Icon

时间序列分析(AR)及API Post 案例

<p><strong>Time Series Prediction and API Demo</strong></p><p><br>本工作流程构建了一个自回归模型,用于预测能源使用量。首先选取合适的 Cluster,然后使用时间序列的第一周被用作季节性校正的模板:通过将当前数值减去前一周相同小时的数值,对数据进行差分处理。再回推(lag)前值,来预测过程中仅使用过去的时间序列数据,不使用其他外部时间序列或数据。回归模型可以是线性回归模型或多项式回归模型。其中的抽样是从前面90%的数据来预测最后10%的数据,并且展示最后的预测结果和模型准确度。</p><p></p><p>之后将数据用 API-POST 方式推送到远程系统,这边使用 webhook.site 来作为测试。可以打开网站来观察结果。</p><p></p><p>本案例是基于:<br><strong>01_Energy_Usage_Time_Series_Prediction</strong></p><p><strong>感谢。。</strong></p><p></p>

URL: Energy Usage Prediction (Time Series Prediction) https://www.knime.org/knime-applications/energy-usage-prediction
URL: All you need is ... the Lag Column Node! https://www.knime.com/blog/all-you-need-is-the-lag-column-node
URL: The Lag Column Node: The Key to Time Series Analysis https://youtu.be/pR_7pIEqW-c

Annotations and comments
  • use https://webhook.site to test it
  • 提取需要的 数据
  • 合并
  • cluster_3
  • 列出时间
  • 获得哪个Cluster列名
  • 获得选择的Cluster数据
  • 重命名
  • with intersection of columns
  • 按照时间顺序排序
  • String 改为日期型
  • 流变量
  • 以周为季节性%%65292 计算 x(t) and x(t-7*24) 的两个点 168
  • 将 x(t) 展开为: x(t), x(t-1), x(t-2), ..., x(t-lag)
  • re-add cluster 168
  • Cluster(t) as target columns with past of cluster(t) as input
  • 计算两点之间 的误差作为 预测值
  • 輸出模型
  • 使用 POST 推送数据
  • 将数据转为 JSON, 做为 API的Payload
  • Original vs. Predicted
  • rebuild original cluster
  • rebuild cluster prediction

Nodes

Extensions

Links