I am trying to run some forecasting models using fable package. The forecasting mable
is as follows,
> fit1
# A mable: 3 x 4
# Key: series.id [3]
series.id arima ets snaive
<int> <model> <model> <model>
1 12000361 <ARIMA(1,0,0) w/ mean> <ETS(M,N,M)> <SNAIVE>
2 12000654 <ARIMA(0,0,0)(0,0,1)[12] w/ mean> <ETS(A,N,N)> <SNAIVE>
3 12000686 <ARIMA(0,1,2)(1,0,0)[12]> <ETS(A,N,A)> <SNAIVE>
I have got the forecasted values,
> fc
# A fable: 108 x 5 [1M]
# Key: series.id, .model [9]
series.id .model mth series.total .distribution
<int> <chr> <mth> <dbl> <dist>
1 12000361 arima 2019 Jan 22.8 N(23, 98)
2 12000361 arima 2019 Feb 23.5 N(24, 104)
3 12000361 arima 2019 Mär 23.7 N(24, 104)
4 12000361 arima 2019 Apr 23.7 N(24, 104)
5 12000361 arima 2019 Mai 23.7 N(24, 104)
6 12000361 arima 2019 Jun 23.7 N(24, 104)
7 12000361 arima 2019 Jul 23.7 N(24, 104)
8 12000361 arima 2019 Aug 23.7 N(24, 104)
9 12000361 arima 2019 Sep 23.7 N(24, 104)
10 12000361 arima 2019 Okt 23.7 N(24, 104)
# … with 98 more rows
It looks like I have the forecasted values. However the accuracy
function is not generating any results,
> accuracy(fc, dt_tsbl)
# A tibble: 9 x 10
.model series.id .type ME RMSE MAE MPE MAPE MASE ACF1
<chr> <int> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 arima 12000361 Test NaN NaN NaN NaN NaN NaN NA
2 arima 12000654 Test NaN NaN NaN NaN NaN NaN NA
3 arima 12000686 Test NaN NaN NaN NaN NaN NaN NA
4 ets 12000361 Test NaN NaN NaN NaN NaN NaN NA
5 ets 12000654 Test NaN NaN NaN NaN NaN NaN NA
6 ets 12000686 Test NaN NaN NaN NaN NaN NaN NA
7 snaive 12000361 Test NaN NaN NaN NaN NaN NaN NA
8 snaive 12000654 Test NaN NaN NaN NaN NaN NaN NA
9 snaive 12000686 Test NaN NaN NaN NaN NaN NaN NA
Warning message:
The future dataset is incomplete, incomplete out-of-sample data will be treated as missing.
12 observations are missing between 2019 Jan and 2019 Dez
Anybody can help me to figure out what is getting wrong here?
A similar post using forecast
package is there, but it isn't helping me to understand why I am having NaN
s.