An Explainable XGBoost Framework for Mortality Prediction in People Living with HIV Receiving Antiretroviral Therapy - Ni Putu Likayuni Viona; Ngakan Nyoman Kutha Krisnawijaya; Desak Nyoman Widyanthini (Indonesian Journal of Electronics, Electromedical Engineering, and Medical Informatics, 2026)
Mortality remains an important concern among people living with HIV (PLHIV) receiving antiretroviral therapy (ART), particularly when high-risk patients are not identified early. This study presents an explainable mortality prediction approach based on an optimized Extreme Gradient Boosting (XGBoost) classifier. A retrospective dataset containing 393 clinical records was analyzed. Before model training, duplicate entries were removed, missing values were imputed, categorical variables were encoded, and class imbalance in the training data was addressed using the Synthetic Minority Over-sampling Technique (SMOTE). Optuna was employed to determine suitable XGBoost hyperparameters, while SHapley Additive exPlanations (SHAP) were used to examine how individual predictors affected the model output. Performance was evaluated on an independent testing set using accuracy, precision, recall, F1-score, and the area under the receiver operating characteristic curve (ROC-AUC). The resulting classifier achieved an accuracy of 89.87%, weighted precision of 0.91, weighted recall of 0.90, weighted F1-score of 0.90, and an ROC-AUC of 0.948. For the mortality class, recall reached 0.97, with 30 of 31 mortality cases correctly detected. Follow-up duration and functional status contributed most strongly to the predictions. SHAP analysis further showed whether these predictors shifted individual outputs toward mortality or survival. The integration of optimized predictive modeling with explainable artificial intelligence enabled accurate mortality prediction while providing transparent insight into how individual predictors influenced the model output. The findings suggest that the model may assist in identifying patients who require closer monitoring, although validation using external and multicenter data is necessary before clinical implementation.