Skip to content

Commit b3a33fa

Browse files
committed
Fix error and style
1 parent d509e76 commit b3a33fa

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

vignettes/articles/smooth-qr.Rmd

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ For a more formal comparison between the two approaches, we could compare the te
268268

269269
```{r, message = FALSE}
270270
baseline_preds_mae_df <- baseline_preds %>%
271-
left_join(tedf_sub, by = c("geo_value", "target_date"))
272-
group_by(ahead) %>%
271+
left_join(tedf_sub, by = c("geo_value", "target_date")) %>%
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 %>%
278-
left_join(tedf_sub, by = c("geo_value", "target_date"))
279-
group_by(ahead) %>%
278+
left_join(tedf_sub, by = c("geo_value", "target_date")) %>%
279+
group_by(ahead) %>%
280280
mutate(error = abs(`0.5` - actual)) %>%
281281
summarise(mean = mean(error)) %>%
282282
mutate(type = "smooth")
@@ -333,15 +333,15 @@ Next, we apply the `wis_dist_quantile` function to get a WIS score for each stat
333333

334334
```{r}
335335
smooth_preds_wis_df <- smooth_preds %>%
336-
left_join(tedf_sub, by = c("geo_value", "target_date"))
337-
rowwise() %>%
336+
left_join(tedf_sub, by = c("geo_value", "target_date")) %>%
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)) %>%
341341
mutate(type = "smooth")
342342
343343
baseline_preds_wis_df <- baseline_preds %>%
344-
left_join(tedf_sub) %>%
344+
left_join(tedf_sub, by = c("geo_value", "target_date")) %>%
345345
rowwise() %>%
346346
mutate(wis = wis_dist_quantile(actual, c(`0.1`, `0.25`, `0.5`, `0.75`, `0.9`), several_quantiles)) %>%
347347
group_by(ahead) %>%

0 commit comments

Comments
 (0)