Comments (3)
It seems, forecast.TSLM
ain't even being run: error probably occurs somewhere in forecast.model
which is defined I'm yet to learn where
from fabletools.
This is because you are using an exogenous regressor in your model (Const
). When forecasting with exogenous regressors, it is not possible to make predictions without knowing future values of the regressors.
In this case, you would need to provide a tsibble to forecast()
containing future time indices to be forecasted, along with the future values of Const
.
I'm moving this to fablelite as an improvement to the error message.
For the example above:
library(fable)
library(tsibble)
library(tsibbledata)
library(lubridate)
# Adding a new measurable
aus_retail <- aus_retail %>% mutate(Const=1)
future_retail <- new_data(aus_retail, n = 24) %>% mutate(Const=1)
aus_retail %>%
filter(
State %in% c("New South Wales", "Victoria"),
Industry == "Department stores"
) %>%
model(
lm = TSLM(Turnover~0+Const),
) %>%
forecast(future_retail) %>%
autoplot(filter(aus_retail, year(Month) > 2010), level = NULL)
Created on 2019-03-21 by the reprex package (v0.2.1)
from fabletools.
Error is now more informative.
library(tsibble)
library(tsibbledata)
library(lubridate)
library(fable)
aus_retail <- aus_retail %>% mutate(Const=1)
aus_retail %>%
filter(
State %in% c("New South Wales", "Victoria"),
Industry == "Department stores"
) %>%
model(
lm = TSLM(Turnover~0+Const),
) %>%
forecast %>%
autoplot(filter(aus_retail, year(Month) > 2010), level = NULL)
#> Error: object 'Const' not found
#> Unable to compute required variables from provided `new_data`.
#> Does your model require extra variables to produce forecasts?
Created on 2019-03-26 by the reprex package (v0.2.1)
from fabletools.
Related Issues (20)
- How to find the mu and sigma associated with an snaive fit HOT 1
- Random Number Generation in the Future Framework HOT 1
- features method failing with .var being a character string HOT 1
- custom x axis breaks HOT 1
- decomposition_model fail when using classical_decomposition HOT 1
- `outliers` function documentation HOT 1
- Error in `wrap_arima()`: When calling refit
- n_flat_spots deprecation when using feature_set(pkg = "feasts") HOT 1
- Trouble using forecast::auto.arima() with fabletools::model() - "no ARIMA models to choose from" HOT 4
- Error in producing residuals from decomposition model HOT 1
- `autoplot()` legend removed by `ggplotly()` HOT 3
- object ‘guide_level’ is not exported by 'namespace:distributional' HOT 3
- Error in `autoplot()`: ! Objects of class <tbl_df> are not supported by autoplot. HOT 1
- Improve handling of contrasts with non-factor variables
- Augment() fails HOT 1
- autoplot.fbl_ts giving error when h=1 HOT 3
- Augment & Forecast occasionally does not produce consistent mean for TSLM(log(mr) ~ trend()) model
- Adding new lst_mdl to existing mable produces unexpected behavior HOT 1
- Calling relocate on a fable transforms it into tsibble
- Automatically drop rank deficient regressors with warning HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabletools.