tidyverts / tidyverts/fabletools
VARIMA, logs of variables and measures of forecast accuracy for the training dat
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 98
- Forks
- 37
- PR merge metrics
- No merged PRs in 30d
Description
Using a data set from the book, I run the following VARIMA model.
library(fpp3)
google_stock <- gafa_stock |> filter(Symbol == "GOOG", year(Date) >= 2015) |> mutate(day = row_number()) |>
update_tsibble(index = day, regular = TRUE)
google_2015 <- google_stock |> filter(year(Date) == 2015)
fit<- google_2015 |> model(VARIMA(vars(log(Open), log(High)) ))
I get this warning when I am trying to get the measures of forecast accuracy for the training data set (google_2015).
fit %>% forecast:: accuracy()
Error in `mutate()`:
ℹ In argument: `fit = map(fit, accuracy, measures = measures, ...)`.
Caused by error in `gather()`:
! Can't select columns that don't exist.
✖ Column `Open` doesn't exist.
Run `rlang::last_trace()` to see where the error occurred.
Without the transformation of the variables I can easily get these measures for the training data set
fit2<- google_2015 |> model(VARIMA(vars(Open, High) ))
fit2 %>% forecast:: accuracy()
# A tibble: 2 × 12
Symbol .model .response .type ME RMSE MAE MPE MAPE MASE RMSSE
<chr> <chr> <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 GOOG VARIMA(… Open Trai… 0.00876 9.48 4.94 -0.0176 0.805 0.698 0.788
2 GOOG VARIMA(… High Trai… -0.00235 10.4 6.09 -0.0271 0.994 0.988 0.962
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the reproducible VARIMA example from the issue with log(Open) and log(High), then compare it with the untransformed model using forecast::accuracy(). The issue is complete when training-set accuracy measures work for the transformed variables without the missing Open column error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- analytics, data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100