単純なglmモデルを評価して経済データ系列を予測したいと仮定します。 以下のコードを検討:CARETのタイムスライス法を用いたモデル解釈
library(caret)
library(ggplot2)
data(economics)
h <- 7
myTimeControl <- trainControl(method = "timeslice",
initialWindow = 24*h,
horizon = 12,
fixedWindow = TRUE)
fit.glm <- train(unemploy ~ pce + pop + psavert,
data = economics,
method = "glm",
preProc = c("center", "scale","BoxCox"),
trControl = myTimeControl)
列車式に使用される共変量は、いくつかの他のモデルによって得られた値の予測値であると仮定する。
Generalized Linear Model
574 samples
3 predictor
Pre-processing: centered (3), scaled (3), Box-Cox transformation (3)
Resampling: Rolling Forecasting Origin Resampling (12 held-out with a fixed
window)
Summary of sample sizes: 168, 168, 168, 168, 168, 168, ...
Resampling results:
RMSE Rsquared
1446.335 0.2958317
別に得られた不良結果から(これは一例に過ぎない): この単純なモデルは、以下の結果を与えます。 それが正しいかどうかのだろうか:
- 上記の結果を考慮するGLMにより、データセット全体に、得られた結果はわずか24 * H = 24 * 7のサンプルを用いて訓練され= 12個のサンプル毎地平線後再トレーニングとして
- 地平線が1から12までのRMSEの評価はどのように評価されますか(http://robjhyndman.com/hyndsight/tscvexample/と報告されています)?
Call: NULL Deviance Residuals: Min 1Q Median 3Q Max -5090.0 -1025.5 -208.1 833.4 4948.4 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 7771.56 64.93 119.688 < 2e-16 *** pce 5750.27 1153.03 4.987 8.15e-07 *** pop -1483.01 1117.06 -1.328 0.185 psavert 2932.38 144.56 20.286 < 2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for gaussian family taken to be 2420081) Null deviance: 3999514594 on 573 degrees of freedom Residual deviance: 1379446256 on 570 degrees of freedom AIC: 10072 Number of Fisher Scoring iterations: 2
パラメータが最後の訓練を受けたGLMを参照してください示したか、「平均」偶然にしている:私はfit.glm概要を示す場合
は私が取得しますか? 私は十分に明確になったことを願っています。