Skip to content

Commit

Permalink
stylr
Browse files Browse the repository at this point in the history
  • Loading branch information
dajmcdon committed Jun 14, 2024
1 parent 38bf81d commit 12fafa6
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions vignettes/articles/smooth-qr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ we've already built. We can simply set the degree to be the number of ahead
values to re-run the code without smoothing.
```{r, warning = FALSE}
baseline_preds <- smooth_fc(
edf, degree = 28L, quantiles = several_quantiles, fd = fd)
edf,
degree = 28L, quantiles = several_quantiles, fd = fd
)
```

And we can produce the corresponding plot to inspect the predictions obtained
Expand Down Expand Up @@ -457,19 +459,21 @@ forecasters are shown in a similar style line plot as we chose for MAE:
smooth_preds_wis_df <- smooth_preds %>%
left_join(tedf_sub, by = c("geo_value", "target_date")) %>%
rowwise() %>%
mutate(wis = wis_dist_quantile(actual, c(`0.1`, `0.25`, `0.5`, `0.75`, `0.9`),
several_quantiles)
) %>%
mutate(wis = wis_dist_quantile(
actual, c(`0.1`, `0.25`, `0.5`, `0.75`, `0.9`),
several_quantiles
)) %>%
group_by(ahead) %>%
summarise(mean = mean(wis)) %>%
mutate(type = "smooth")
baseline_preds_wis_df <- baseline_preds %>%
left_join(tedf_sub, by = c("geo_value", "target_date")) %>%
rowwise() %>%
mutate(wis = wis_dist_quantile(actual, c(`0.1`, `0.25`, `0.5`, `0.75`, `0.9`),
several_quantiles)
) %>%
mutate(wis = wis_dist_quantile(
actual, c(`0.1`, `0.25`, `0.5`, `0.75`, `0.9`),
several_quantiles
)) %>%
group_by(ahead) %>%
summarise(mean = mean(wis)) %>%
mutate(type = "baseline")
Expand Down

0 comments on commit 12fafa6

Please sign in to comment.