Skip to content

Commit 22563e2

Browse files
committed
slides for chapter 9
1 parent 5dc2742 commit 22563e2

File tree

1 file changed

+71
-4
lines changed

1 file changed

+71
-4
lines changed

09_predictive-modelling-and-beyond.Rmd

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,79 @@
22

33
**Learning objectives:**
44

5-
- THESE ARE NICE TO HAVE BUT NOT ABSOLUTELY NECESSARY
5+
- How to use models’ predictions on new data
6+
- Time series analysis
7+
- Mixed models
8+
9+
## Overview of predictive modelling
10+
11+
In this chapter we'll talk about:
12+
13+
- the challenges of applying predictions to new data
14+
- the use of time series analysis, and mixed models to anticipate the trajectory of infectious diseases and health metrics.
15+
16+
> By exploring the underlying patterns and analysing historical data, we estimate the disease burden and evaluate the impact of interventions on population health.
17+
18+
19+
## Predicting the future
20+
21+
### Dengue Test Predictions for 2017-2021
22+
23+
Test of the Dengue’s model made with mlr3 meta-package in Chapter 8.
24+
25+
26+
```{r}
27+
#| eval: false
28+
new_data <- hmsidwR::infectious_diseases %>%
29+
arrange(year)%>%
30+
filter(cause_name == "Dengue",
31+
year>=2017,
32+
!location_name %in% c("Eswatini", "Lesotho")) %>%
33+
drop_na() %>%
34+
group_by(location_id) %>%
35+
select(-location_name, -cause_name)
36+
```
37+
38+
```{r}
39+
#| eval: false
40+
new_pred_regr.cv_glmnet <-
41+
rr1$learners[[1]]$predict_newdata(new_data,
42+
task = rr1$task)
43+
44+
new_pred_regr.xgboost <-
45+
rr2$learners[[1]]$predict_newdata(new_data,
46+
task = rr2$task)
47+
```
48+
49+
## Time series analysis
50+
51+
> To evaluate the evolution of the phenomenon in time
52+
53+
Time series data can show different characteristics, such as:
54+
55+
- trend
56+
- seasonality
57+
- cyclic patterns
58+
- irregular fluctuations
59+
60+
evaluation methods:
61+
62+
- decomposition:
63+
- trend
64+
- seasonality
65+
- random fluctuations
66+
- smoothing:
67+
- moving average
68+
- exponential smoothing
69+
- modelling:
70+
- ARIMA
71+
- Mixed models
72+
73+
### SDI Time Series Analysis with Mixed Effect Models
74+
75+
hands-on session
676

7-
## SLIDE 1 {-}
877

9-
- ADD SLIDES AS SECTIONS (`##`).
10-
- TRY TO KEEP THEM RELATIVELY SLIDE-LIKE; THESE ARE NOTES, NOT THE BOOK ITSELF.
1178

1279
## Meeting Videos {-}
1380

0 commit comments

Comments
 (0)