Closed mdancho84 closed 3 years ago
Note that add_recipe()
works fine.
workflow() %>%
add_model(model_spec_arima) %>%
add_recipe(recipe(value ~ date, training(splits))) %>% # <-- Replace with this
fit(training(splits))
Output (as expected):
frequency = 12 observations per 1 year
== Workflow [trained] ==========================================================
Preprocessor: Recipe
Model: arima_reg()
-- Preprocessor ----------------------------------------------------------------
0 Recipe Steps
-- Model -----------------------------------------------------------------------
Series: outcome
ARIMA(0,1,1)(0,1,1)[12]
Coefficients:
ma1 sma1
-0.3405 -0.4781
s.e. 0.0652 0.0628
sigma^2 estimated as 25114: log likelihood=-1699.55
AIC=3405.1 AICc=3405.19 BIC=3415.8
This is a known issue in workflows
Use a recipe
as a preprocessor instead of a formula. I have a working example discussed here: #48
+1
The workflow
add_formula()
interface does not seem to be transferring the date as an encoded feature.