mitchelloharawild / fable.prophet

fable extension for the prophet forecasting procedure
https://pkg.mitchelloharawild.com/fable.prophet
55 stars 8 forks source link

How to combine the models if any one of them is showing NULL value in FABLE package? #31

Open Adarsha1991 opened 2 years ago

Adarsha1991 commented 2 years ago

Code

fit1 <- train %>% model( ets = ETS(value), arima = ARIMA(value), SNAIVE= SNAIVE(value ~ lag("year")), prophet = prophet(value), nn = NNETAR(value), var=VAR(value ~ AR(4)), tslm=TSLM(value ~ trend() + season())

) %>% mutate( mixed = (ets + arima + tslm + prophet + nn + var)/6 )

fc1 <- fit1 %>% forecast(h = "1 years")

for example if ARIMA model is NULL then mixed values in fc1 would not throw any result. We need mixed model value in fc1 that excludes NULL model and give us results. Can anyone help us? we are using Fable package.