Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After passing a forecast object through the add_coverage function, it is re-transformed into a data.table. #559

Closed
toshiakiasakura opened this issue Jan 5, 2024 · 1 comment · Fixed by #586
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@toshiakiasakura
Copy link
Collaborator

When I work on this package, I found the following bug.

As illustrated in the example, if I ran the following code, I obtained the "forecast_quantile" object.

example_quantile %>%
  set_forecast_unit(c("location", "target_end_date", "target_type", "horizon", "model")) %>%
  as_forecast() %>%
  class()
#> 'forecast_quantile''data.table''data.frame'

However, if I check class after passing through the add_coverage function, the object suddenly becomes a data.table.

example_quantile %>%
  set_forecast_unit(c("location", "target_end_date", "target_type", "horizon", "model")) %>%
  as_forecast() %>%
  add_coverage() %>% 
  class()
#> 'data.table''data.frame'

Expected outcome would be 'forecast_quantile''data.table''data.frame'.

@seabbs seabbs added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Jan 5, 2024
@nikosbosse
Copy link
Contributor

Adding to this, I think the same is true for transform_forecasts()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
3 participants