Add multi-step fitted value methods for TSLM and others
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- R
- Stars
- 588
- Forks
- 71
- Avg merge
- 1h 58m
- Merged PRs (30d)
- 1
Description
Reported at https://stackoverflow.com/q/70782047/144157
library(fable)
#> Loading required package: fabletools
model_fit <- tsibbledata::aus_production %>%
model(mod = TSLM(Beer ~ Gas + trend()))
fitted(model_fit, h = 2)
#> # A tsibble: 218 x 3 [1Q]
#> # Key: .model [1]
#> .model Quarter .fitted
#> <chr> <qtr> <dbl>
#> 1 mod 1956 Q1 NA
#> 2 mod 1956 Q2 NA
#> 3 mod 1956 Q3 NA
#> 4 mod 1956 Q4 NA
#> 5 mod 1957 Q1 NA
#> 6 mod 1957 Q2 NA
#> 7 mod 1957 Q3 NA
#> 8 mod 1957 Q4 NA
#> 9 mod 1958 Q1 NA
#> 10 mod 1958 Q2 NA
#> # … with 208 more rows
Created on 2022-01-21 by the reprex package (v2.0.1)
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 with the fitted(model_fit, h = 2) entry point and the TSLM example in the issue, then inspect how fitted values are implemented for TSLM and other models. Done means the multi-step call returns fitted values rather than the shown NAs, with behavior defined for the affected model methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100