Skip to content

Commit 4b7059e

Browse files
committed
Intro changes & style
1 parent d1a0be4 commit 4b7059e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

vignettes/smooth-qr.Rmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ knitr::opts_chunk$set(
1919

2020
# Introducing smooth quantile regression
2121

22-
Whereas the standard application of time-series forecasting techniques has been to forecast a single horizon, in multi-period forecasting, the goal is to forecast several horizons simultaneously. This is useful in epidemiological applications where decisions are based on the trend of a signal.
22+
Whereas other time-series forecasting examples in this package have used (direct) models for single horizons, in multi-period forecasting, the goal is to (directly) forecast several horizons simultaneously. This is useful in epidemiological applications where decisions are based on the trend of a signal.
2323

24-
The idea underlying smooth quantile regression is that the future can be approximated by a smooth curve. This novel approach from [Tuzhilina et al., 2022](https://arxiv.org/abs/2202.09723) enforces smoothness across the horizons and can be applied to point estimation by regression or interval prediction by quantile regression. Our focus in this vignette is the latter.
24+
The idea underlying smooth quantile regression is that set forecast targets can be approximated by a smooth curve. This novel approach from [Tuzhilina et al., 2022](https://arxiv.org/abs/2202.09723) enforces smoothness across the horizons and can be applied to point estimation by regression or interval prediction by quantile regression. Our focus in this vignette is the latter.
2525

2626
# Built-in function for smooth quantile regression and its parameters
2727

@@ -269,14 +269,14 @@ For a more formal comparison between the two approaches, we could compare the te
269269
```{r, message = FALSE}
270270
baseline_preds_mae_df <- baseline_preds %>%
271271
left_join(tedf_sub, by = c("geo_value", "target_date"))
272-
group_by(ahead) %>%
272+
group_by(ahead) %>%
273273
mutate(error = abs(`0.5` - actual)) %>%
274274
summarise(mean = mean(error)) %>%
275275
mutate(type = "baseline")
276276
277277
smooth_preds_mae_df <- smooth_preds %>%
278278
left_join(tedf_sub, by = c("geo_value", "target_date"))
279-
group_by(ahead) %>%
279+
group_by(ahead) %>%
280280
mutate(error = abs(`0.5` - actual)) %>%
281281
summarise(mean = mean(error)) %>%
282282
mutate(type = "smooth")
@@ -334,7 +334,7 @@ Next, we apply the `wis_dist_quantile` function to get a WIS score for each stat
334334
```{r}
335335
smooth_preds_wis_df <- smooth_preds %>%
336336
left_join(tedf_sub, by = c("geo_value", "target_date"))
337-
rowwise() %>%
337+
rowwise() %>%
338338
mutate(wis = wis_dist_quantile(actual, c(`0.1`, `0.25`, `0.5`, `0.75`, `0.9`), several_quantiles)) %>%
339339
group_by(ahead) %>%
340340
summarise(mean = mean(wis)) %>%

0 commit comments

Comments
 (0)