Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional checks for forecast data time periods #237

Open
mitchelloharawild opened this issue Feb 26, 2020 · 1 comment
Open

Add additional checks for forecast data time periods #237

mitchelloharawild opened this issue Feb 26, 2020 · 1 comment

Comments

@mitchelloharawild
Copy link
Member

https://stackoverflow.com/questions/60264409/forecast-initialization-with-the-fable-package

Error should be raised if new_data doesn't continue from the training data.

@Timood
Copy link

Timood commented Aug 13, 2021

Hi Mitchell and others,

You might also want to adapt the check on the extra variables required to produce forecasts.

The code example below now produces an error, saying that extra variables might be required: (fable 0.3.1)

fit <- insurance %>%
  model(ARIMA(Quotes ~ pdq(d = 0) +
                lag(TVadverts)))

insurance_future <- new_data(insurance, 1)

fit %>%
  forecast(insurance_future) -> fc

However, there are no extra variables required to produce this forecast. The model contains a lagged predictor and the forecast is demanded for just one step ahead.

Edit: there is actually an easy way to prevent this error by using new_data(insurance, 1, keep_all = TRUE).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants