tidyverts / tidyverts/fabletools

response(<mdl_ts>) is unable to backtransform from parameters existing in the data

Open
#301 10 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
98
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Should the model object also store these parameters?
From #103

library(fable)
#> Loading required package: fabletools
library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
uad <- as_tsibble(USAccDeaths)
uad %>% 
  bind_cols(features(uad, value, feasts::guerrero)) %>% 
  model(SNAIVE(box_cox(resp(value), lambda_guerrero))) %>% 
  response()
#> Error: Problem with `mutate()` input `response`.
#> x object 'lambda_guerrero' not found
#> ℹ Input `response` is `map(.fit, response)`.

Created on 2021-01-08 by the reprex package (v0.3.0)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported example using response() with SNAIVE(box_cox(resp(value), lambda_guerrero)) after adding lambda_guerrero via features(). Trace why response() cannot find the existing parameter, then ensure the model object retains enough information for response() to backtransform the data; the example should complete without the object-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.