【发布时间】:2018-01-29 17:44:56
【问题描述】:
我一直在尝试理解 Pierre Gaillard 和 Yannig Goude 的 Opera“专家聚合在线预测”。我阅读了 Pierre Gaillard (http://pierre.gaillard.me/opera.html) 和 Rob Hyndman (https://robjhyndman.com/hyndsight/forecast-combinations/) 的两篇文章。但是,我不明白如何预测未来的价值。在 Pierre 的示例中,newY = Y 表示测试数据集 (Y
> tail(electric_load,5)
Time Day Month Year NumWeek Load Load1 Temp Temp1 IPI
727 727 30 11 2009 0.9056604 63568.79 58254.42 7.220536 10.163839 91.3 88.4
728 728 7 12 2009 0.9245283 63977.13 63568.79 6.808929 7.220536 90.1 87.7
729 729 14 12 2009 0.9433962 78046.85 63977.13 -1.671280 6.808929 90.1 87.7
730 730 21 12 2009 0.9622642 66654.69 78046.85 4.034524 -1.671280 90.1 87.7
731 731 28 12 2009 0.9811321 60839.71 66654.69 7.434115 4.034524 90.1 87.7
我注意到,通过将 MLpol0 的权重乘以 X,我们得到与在线预测值相似的输出。
> weights <- predict(MLpol0, X, Y, type='weights')
> w<-weights[,1]*X[,1]+weights[,2]*X[,2]+weights[,3]*X[,3]
> predValues <- predict(MLpol0, newexpert = X, newY = Y, type='response')
Test_Data predValues w
620 65564.29 65017.11 65017.11
621 62936.07 62096.12 62096.12
622 64953.83 64542.44 64542.44
623 61580.44 60447.63 60447.63
624 71075.52 67622.97 67622.97
625 75399.88 72388.64 72388.64
626 65410.13 67445.63 67445.63
627 65815.15 62623.64 62623.64
628 65251.90 64271.97 64271.97
629 63966.91 61803.77 61803.77
630 64893.42 65793.14 65793.14
631 69226.32 67153.80 67153.80
但我仍然不确定如何在没有 newY 的情况下生成权重。也许我们可以使用作为 MLpol 输出的最终系数来预测未来值?
(c<-summary(MLpol <- mixture(Y = Y, experts = X, model = "MLpol", loss.type = "square"))$coefficients)
[1] 0.585902 0.414098 0.000000
很抱歉,我可能对此有所了解,我的问题可能根本没有意义,但我非常感谢任何帮助/见解。
【问题讨论】:
-
Opera 包结合了预测。如果要预测 y+1,则需要来自不同预测者对 x+1 的预测。这些“不同”预测器的组合(=集合)由 MLpol 算法完成。 $coefficients 给出权重向量,将其与 x+1 向量一起应用得到 y+1 值。
标签: r