Forecasting tuberculosis (TB) incidence among children under 5 in South Africa using a hybrid Random Forest-Bayesian ARIMA model
# RF-BARIMA TB Forecasting in South Africa
This repository accompanies the manuscript:
**Title:**
*Machine Learning Forecasting Model of Tuberculosis Cases Among Children in South Africa*
## Abstract
Globally, children under 15 years old represent ~11% of all TB cases. The burden in those under 5 years in South Africa remains underexplored. This study presents a novel hybrid Random Forest-Bayesian ARIMA (RF-BARIMA) model to forecast TB incidence in Eastern Cape Province from 2010 to 2019. The RF-BARIMA model demonstrated superior forecasting performance over traditional models. Forecasts estimate an average of 0.4122 TB cases/month in 2022, suggesting a potential reduction of 1670.85 mean cases. These results highlight potential under-reporting and call for urgent improvements in surveillance and public health interventions.
Forecasting tuberculosis (TB) incidence among children under 5 in South Africa using a hybrid Random Forest-Bayesian ARIMA model
---
## Forecasting Pipeline
The modelling workflow includes:
- Data ingestion and preprocessing
- Model training using ARIMA, Bayesian ARIMA (via `bayesmodels`), Prophet, TBATS, and MARS
- Hybridisation with XGBoost and model calibration using `modeltime`
- Forecast generation and accuracy evaluation
- Final forecasting for 3 years beyond the dataset
## Packages Used
library(tidyverse)
library(lubridate)
library(modeltime)
library(bayesmodels)
library(forecastHybrid)
library(timetk)
library(catboost)
library(prophet)
library(tbats)
library(recipes)
library(parsnip)
library(rsample)