Skip to content

Commit bbd4b49

Browse files
committed
brief comments on the scorecaster code
1 parent 1ecce67 commit bbd4b49

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

vignettes/articles/scorecaster.Rmd

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ library(tidyverse)
1818
library(epipredict)
1919
```
2020

21+
First we get some forecasts.
22+
2123
```{r forecast-output}
2224
jhu <- case_death_rate_subset
2325
fc_time_values <- seq(as.Date("2021-03-09"), as.Date("2021-12-01"), by = "4 weeks")
@@ -46,6 +48,7 @@ out <- left_join(
4648
)
4749
```
4850

51+
Now we set up the "quantile conformal score" and the tangent integrator.
4952

5053
```{r necessary-funs}
5154
quantile_conformal_score <- function(x, actual) {
@@ -80,7 +83,15 @@ tangent_integrator <- function(x, t, KI = 1000, Csat = 2) {
8083
}
8184
```
8285

86+
Score the forecasts.
87+
8388
```{r score-fcasts}
8489
out <- out |>
8590
mutate(qc_scores = quantile_conformal_score(.pred_distn, death_rate))
8691
```
92+
93+
Now we would need a "scorecaster". The paper has code here:
94+
https://github.com/aangelopoulos/conformal-time-series/blob/b729c3f5ff633bfc43f0f7ca08199b549c2573ac/tests/datasets/covid-ts-proc/statewide/death-forecasting-perstate-lasso-qr.ipynb
95+
96+
Not quite sure what the model is. Note that `epipredict::quantile_reg()` may work
97+
(without the $\ell_1$ penalty).

0 commit comments

Comments
 (0)