How EpiLag-PH works. From weekly data to a plan.
EpiLag-PH forecasts weekly dengue cases 2–8 weeks ahead for 86 provinces, 17 regions and Quezon City, from recent cases and lagged rain, heat and humidity. It flags areas heading for an outbreak and turns each alert into a checklist and a budget plan.
- LightGBM quantile regression
- Conformal calibration
- SHAP explanations
- No-peeking backtests
- Knapsack budget plan
- 1
Data
4 public sources: cases, rain, population. Cleaned and coded.
- 2
Features
Recent cases, rain over 12 weekly lags, season, heat.
- 3
Model
LightGBM ranges, calibrated to 80%, with SHAP reasons.
- 4
Test
Past years only, against 2 simple rules. Won 5 of 6.
- 5
Action
Alert levels, week-by-week checklists, budget plan.
Each stage feeds the next; the test stage uses only years the model never saw.
Four public sources, one weekly panel.
Cleaned totals match the raw file exactly (2019: 441,902 cases).
| Source | What we use | Coverage |
|---|---|---|
| DOH dengue cases via HDX (official PJDSC dataset) | Weekly cases by province | 2016 – Jan 2021, 86 units |
| UPRI-NOAH Dengue–Rainfall Dataset (Zenodo 19448695) | Weekly cases and rain | 17 regions (2016–2019, 2022–2025); Quezon City (2010–2025) |
| ERA5 reanalysis via Open-Meteo | Daily rain, temperature, humidity at each area's centre | Summed to weeks |
| OCHA COD-AB / COD-PS (PSA-based) | Area codes, boundaries, 2022 population | All areas |
Names to codes
126 location names matched to 86 official PSGC units; typos fixed (NUEVA VISCAYA, SISQUIJOR, BASILIG).
Consistent units
Cities folded into provinces, NCR split into 4 districts, Maguindanao kept whole for 2016–2020.
Bad values removed
Deaths for 2016–2017 excluded: 586 weeks show more deaths than cases.
Missing stays missing
A week with no report is left empty, never set to zero.
Rain turns into cases 4–8 weeks later.
So each week of rain enters the model separately, as its own lag. That lag is the "Lag" in EpiLag.
Rain, lagged week by week
Rain in each of the last 12 weeks separately; 4-, 8- and 12-week totals; heavy-rain days.
Recent cases
Each of the last 4 weeks; 4- and 12-week averages; trend; same week last year.
Heat, humidity, season, population
Lagged temperature and humidity for provinces (the regional model's weather is rain only); week of the year as a cycle, so late December sits next to early January; log population, so large and small areas share one model.
Targets
Cases 2, 4, 6 and 8 weeks ahead, on a log scale so large outbreaks do not dominate training.
A likely range, not a single number.
Gradient-boosted trees predict a low, middle and high case count; a calibration step makes that range honest.
Model
LightGBM quantile regression: one model per horizon (2/4/6/8 weeks), trained on all areas together.
Range
10th, 50th and 90th percentiles of the coming weeks' cases, sorted so low ≤ middle ≤ high.
Calibration
Conformalized quantile regression (Romano et al. 2019): hold out the last training year, measure misses, widen the range to cover 80%.
Explanations
SHAP values grouped into recent cases, season, rain by week, humidity and temperature.
Tested honestly. No peeking at the future.
Each test year is forecast by a model trained only on earlier years (2019 from 2016–2018), against two simple rules: "same week last year" and "same as this week".
test sets where it beat both rules, 4 weeks ahead
of outbreak starts caught 4 weeks ahead (watch level)
of real values inside the likely range (target 80%)
provinces flagged 4 weeks before crossing the threshold (2 Jun 2019 replay)
| Test set | EpiLag error | Same week last year | Same as this week | Inside range | Starts caught | False alarms |
|---|---|---|---|---|---|---|
| Provinces 2019 | 42 (lowest) | 64 | 53 | 77% | 87% | 46% |
| Provinces 2020 | 10 (lowest) | 86 | 12 | 79% | 83% | 87% |
| Regions + QC 2019 | 174 (lowest) | 255 | 213 | 70% | 79% | 42% |
| Regions + QC 2023 | 58 | 158 | 56 (lowest) | 92% | 100% | 63% |
| Regions + QC 2024 | 101 (lowest) | 229 | 149 | 80% | 80% | 42% |
| Regions + QC 2025 | 86 (lowest) | 283 | 108 | 78% | 100% | 54% |
Error = mean absolute error in cases per area-week, 4 weeks ahead; the lowest in each row is marked. Caught and false alarms are for the watch level.
Every alert comes with a plan.
Thresholds per area and week of year, from earlier years only: usual = the average for that week (±2 weeks); epidemic = that average + 2 standard deviations.
- Outbreak warningMiddle forecast above the epidemic thresholdConvene the task force; clean-ups in top barangays; prepare hospitals
- WatchHigh forecast above the epidemic thresholdInspect breeding sites; check test-kit and IV-fluid stocks
- Above usualMiddle forecast above usualRemind households of the DOH 4S
- NormalMiddle forecast at or below usualKeep routine surveillance and clean-ups
Action checklist
Week-by-week steps for each level (today, weeks 1–2, weeks 2–4) and what EpiLag-PH contributes to each, downloadable as an action brief.
Budget allocation
A fractional knapsack ranks area-and-action pairs by cases averted per peso. Effects from Bowman et al. (2016): 10–50% for clean-ups with container covers, 0–10% for fogging. Costs are editable.
Quezon City barangays
The city forecast is shared out by each barangay's share of cases in 2022–2025, because barangay data is yearly only.
Simple, explainable, honestly tested.
Past PJDSC champions won with models like XGBoost and K-means used well, not with deep learning.
Explainable over exotic
LightGBM with SHAP can be defended in front of judges and health officers, and it held up against three other methods on the same test.
Ranges over single numbers
A health office stocks supplies for the high case.
No peeking
Every result comes from years the model never saw, compared with simple rules, with false alarms and the weak weather effect reported.
All of it is open. Check every number.
Code for each stage in src/, every result as CSV in reports/, and the full write-up in the README.