-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
After the model is refitted with refit() on new data, it seems to lose attributes method and sparse which causes error in forecast.lst_mint_mdl here . The problem appears to be in refit.mdl_df, where the attributes are lost.
library(tsibble)
library(fabletools)
library(fable)
lung_deaths_agg <- as_tsibble(cbind(mdeaths, fdeaths)) %>%
aggregate_key(key, value = sum(value))
fit <- lung_deaths_agg %>%
model(lm = TSLM(value ~ trend() + season())) %>%
reconcile(lm = min_trace(lm))
fit_refit <- fit %>% refit(lung_deaths_agg)
fit %>% forecast()
fit_refit %>% forecast()
Error: Problem with `mutate()` input `lm`.
✖ argument is of length zero
ℹ Input `lm` is `(function (object, ...) ...`.
Run `rlang::last_error()` to see where the error occurred.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working