Comparison of Tree-Based Machine Learning Models for Classification of Tuberculosis Outcomes in Brazil
Abstract
Tuberculosis remains a significant public health concern, recognized as a reemerging disease strongly associated with socioeconomic conditions. According to the World Health Organization, tuberculosis continues to be the leading cause of death from a single infectious agent worldwide in 2025. This study evaluates Random Forest, XGBoost, CatBoost, and LightGBM for classifying four treatment outcomes (cure, abandonment, death from tuberculosis, and death from other causes) using 53,656 epidemiological records from Minas Gerais, Brazil (20102024). A preprocessing pipeline was designed to handle heterogeneous and high-cardinality variables. Models were assessed with and without SMOTE balancing under 5-fold stratified cross-validation, using accuracy, weighted F1-score, and per-class recall as evaluation metrics. Without balancing, all models achieved approximately 0.75 accuracy but failed to detect minority outcomes. Experiments across multiple random seeds, feature subset analysis, and temporal validation were conducted to assess model robustness. With SMOTE, CatBoost achieved the best overall performance, with the highest cross-validation F1-score (0.7071 0.0034) and improved recall for abandonment and death outcomes. Results indicate that the combination of clinical and socioeconomic features is essential for predictive performance, and that data quality and class imbalance are the main obstacles to reliable minority-class detection in tuberculosis surveillance.