I am getting when I use ARIMA but if I fix the parameters like d = 1 then it run successfully and give model. I tried ETS model and it also worked as expected. I am running this in databricks DBR 8.0 with following R version -
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10)
nickname Bunny-Wunnies Freak Out
However if I run the same in win10 system then it produces expected results.
I have created a dummy code here for reproducing the case -
# CREATE DATA SET FOR REPRODUCING THE SCENARIO
databrics_dummy <- data.frame(cal_dt = seq(as.Date("2020-01-01"), as.Date("2021-03-31"), by = "day"),
department = rep("F22", 456),
observed_cleaned = seq(20, 60, length = 456))
# creating group key & index
databrics_dummy_ts <-
databrics_dummy %>%
as_tsibble(index= cal_dt, key = department) %>%
group_by_key()
# impute missing values
databrics_dummy_ts <-
databrics_dummy_ts %>%
fill_gaps() %>%
fill(observed_cleaned, .direction = "down")
# run model
fit_db <-
databrics_dummy_ts %>%
model(
arima = ARIMA(observed_cleaned),
arima_def = ARIMA(observed_cleaned ~ pdq(d=1) + PDQ(D=1)),
ets = ETS(observed_cleaned)
)
# Results
# A mable: 1 x 4
# Key: department [1]
department arima arima_def ets
<chr> <model> <model> <model>
1 F22 <NULL model> <ARIMA(1,1,1)(0,1,1)[7]> <ETS(M,A,M)>
It produces NULL model for auto arima. I am using databricks platform (run it in 8.0 runtime environment).
Environment detail -
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 0.3
year 2020
month 10
day 10
svn rev 79318
language R
version.string R version 4.0.3 (2020-10-10)
nickname Bunny-Wunnies Freak Out
I am very surprised. This time I am also getting result but only change that i made is attached fpp3 library instead fable. However I tried some more models and I found it is coming as NULL. Attached code is here
@mitchelloharawild can you please help me here? custom_1, custom_2 and custom_3 produces the NULL model. But when I am adding constant in these models it is producing models. Also I am using the same environment (linux based) as mentioned above.
In case you face issue in reproducibility, can you please guide how can I create reproducible code?
The models you are attempting to estimate are too complicated for the automatic selection algorithm's default constraint of order_constraint = p + q + P + Q <= 6 & (constant + d + D <= 2). Hence why you are getting the error of There are no ARIMA models to choose from after imposing the 'order_constraint', please consider allowing more models.. This is indicated in the given warning message:
It looks like you're trying to fully specify your ARIMA model but have not said if a constant should be included.
You can include a constant using ARIMA(y~1) to the formula or exclude it by adding ARIMA(y~0).
Your custom_3 model produces estimation errors in the stats::arima() function.
Thanks @mitchelloharawild !
I got it now.
I want to understand few more things. I am training a model with fourier term. Using fable interface, how can I add fourier term in forecast function when forecasting for future.
Also, when I am saving the model in .RDS format I am not able to retrieve it. Is there other way to save models?
Including fourier terms as an exogenous regressor can be done using fourier(period = "year", K = num_harmonics). When forecasting a model with exogenous regressors, the fourier terms into the future will automatically be produced.