我一直在尝试理解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 <- data_test$Load),其中包含法国电力负载的每周观察值。如下所示,数据截至2009年12月。现在,我该如何预测2010年的值?这里的newY会是什么?
> 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
非常抱歉,我的问题可能完全不准确,可能没有任何意义,但我真的很感激任何帮助/见解。