MMF.
• 7 min read

Forecasting Dengue Outbreaks Across Bangladesh

How I built a district-level forecasting framework to compare statistical, machine-learning, and deep-learning models from one to six months ahead.

Peer-Reviewed Journal Publication • PLOS ONE

Tactical vs. strategic: An adaptable framework for horizon-dependent dengue forecasting using data-driven approaches with serotype and climate covariates in Bangladesh

Md. Muqtadir Fuad, Md. Sajib Milki, Ridwan Al Aziz • Published: August 21, 2026

Aedes aegypti mosquito, the primary vector of dengue

Dengue forecasting is not simply a matter of predicting the next number in a time series. Case counts can change sharply across seasons and locations, districts do not behave alike, and the warning becomes less certain as the forecast horizon grows. A useful system therefore needs to answer several questions at once: how many cases might occur, where might they occur, how far ahead can we see, and how reliable is the warning?

I built Dengue Forecasting as a reproducible framework for investigating those questions. The project forecasts monthly dengue cases at district level for horizons of one to six months, and evaluates a broad set of models through a consistent pipeline. The goal is not to crown a fashionable algorithm; it is to understand which approaches remain dependable across locations, lead times, and outbreak regimes.

One problem, several modeling perspectives

No single family of models has an automatic advantage on this kind of data. Classical time-series methods can capture trend and seasonality with relatively transparent assumptions. Tree ensembles are strong at learning nonlinear relationships from engineered features. Recurrent neural networks can model temporal dependencies, while transformer-based forecasting can combine static and time-varying signals across multiple horizons.

The repository implements a deliberately diverse model suite:

  • Statistical baselines: Multiple Linear Regression, SARIMAX, and Prophet.
  • Machine learning: Random Forest, Support Vector Regression, XGBoost, and CatBoost.
  • Deep learning: stacked LSTM, attention LSTM, and the Temporal Fusion Transformer.

Keeping these models in one framework makes the experiment more useful than a collection of isolated notebooks. Each approach receives comparable train, validation, and test treatment, produces predictions in a common long format, and reports results at the overall, district, and forecast-horizon levels.

Designing for real forecasting, not random splitting

Time-series evaluation must respect chronology. A random split can leak information from the future into the past and produce an optimistic score that will not survive deployment. This project uses held-out validation and test periods, with configurable purge intervals between splits. Hyperparameter tuning happens within that temporal structure rather than borrowing future observations.

The pipeline also treats the forecast horizon as a first-class variable. A one-month warning and a six-month warning are different tasks, so their errors should not be hidden inside a single average. Every model can generate horizon-specific results, allowing performance to be traced as the lead time increases.

From raw records to district-level features

The preprocessing stage organizes historical case observations, selected predictors, district identifiers, and time-indexed features into model-ready data. Districts can be represented explicitly, including through one-hot encoding where appropriate, so a pooled model can learn shared patterns without pretending that every location is identical.

The repository also contains Bangladesh administrative boundary data and scripts for district-level reporting. That spatial layer matters: a national total may describe the size of a dengue season, but local planning depends on knowing how risk is distributed.

Evaluation beyond a single error score

Forecast quality is evaluated using both continuous magnitude metrics and binary outbreak classification scores across lead horizons $h \in \{1, 2, \dots, 6\}$:

Continuous Error Metrics:

$$\text{MAE} = \frac{1}{N}\sum_{t=1}^{N} |y_t - \hat{y}_t|, \qquad \text{RMSE} = \sqrt{\frac{1}{N}\sum_{t=1}^{N} (y_t - \hat{y}_t)^2}, \qquad \text{MAPE} = \frac{100\%}{N}\sum_{t=1}^{N} \left|\frac{y_t - \hat{y}_t}{y_t}\right|$$

Outbreak Early Warning & Alerting Metrics:

$$\text{Precision} = \frac{\text{TP}}{\text{TP} + \text{FP}}, \qquad \text{Recall} = \frac{\text{TP}}{\text{TP} + \text{FN}}, \qquad F_1 = 2 \cdot \frac{\text{Precision} \cdot \text{Recall}}{\text{Precision} + \text{Recall}}$$

The generated artifacts include metrics by district, by horizon, and by case regime, together with train, validation, and test predictions and residuals. Outbreak classification reports connect continuous case forecasts to the operational question of whether a public health surge is detected in advance.

Interpretability is part of the workflow as well. Feature-importance and sensitivity outputs help explain what drives a model, while SHAP analysis is available for XGBoost. Separate causality experiments use Granger causality and PCMCI, and Diebold–Mariano significance tests help determine whether differences in forecast error are statistically significant rather than incidental.

What the experiments revealed

The repository results show XGBoost and Random Forest as competitive performers across forecast horizons. They also reinforce three important realities: accuracy generally declines at longer lead times, performance varies substantially between districts, and low-case regimes are especially difficult to predict. Those findings argue against presenting one aggregate score as the full story.

In an early-warning setting, the best model is not necessarily the one with the smallest global RMSE. A useful choice must balance case-count accuracy, outbreak recall, stability across districts, interpretability, and the amount of advance notice it provides. The framework preserves these views so that model selection can reflect the operational need.

Building a reproducible research pipeline

Each model writes a structured set of artifacts: fitted model files, tuned parameters, configuration manifests, long-form predictions, residuals, per-horizon summaries, district-level metrics, regime-wise results, and interpretation outputs. This makes an experiment traceable and allows downstream comparison scripts to work without model-specific manual cleanup.

The project also documents separate environments where library requirements differ (particularly for SARIMAX and the Temporal Fusion Transformer). It is a practical detail, but an important one: reproducibility includes the software environment, not only the modeling code.

The larger lesson

The most valuable result of this work is the evaluation system around the models. Reliable dengue forecasting requires chronological validation, local analysis, horizon-aware reporting, interpretable evidence, and honest treatment of uncertainty. A sophisticated architecture is useful only when the surrounding experiment can show where it works and where it fails.

Research Paper & Resources

The full experimental methodology, district-panel datasets, serotype and climate covariates analysis, and benchmark findings are published open-access: