Early Prediction of Liver Disease Using Ensemble Machine Learning Models and Explainable AI Techniques
摘要
The liver is the largest gland in the human body, essential for nutrient metabolism, detoxification, and immune defense. Liver dysfunction, often resulting from viral infections or toxic exposures, presents serious health challenges. This study proposes a robust liver disease prediction system leveraging ensemble machine learning (ML) models integrated with explainable AI (XAI) techniques to enhance interpretability and clinical utility. Seventeen ML models were trained and evaluated across three diverse liver disease datasets, encompassing clinical biomarkers and demographic variables. The data preprocessing pipeline involved cleaning, feature engineering, feature selection, skewness correction via logarithmic transformation, outlier removal using the interquartile range method, feature scaling with StandardScaler, and class balancing through SMOTEENN. Hyperparameter tuning was performed using Optuna with Bayesian optimization, and model validation utilized 10-fold cross-validation to ensure robustness. Among the models, Random Forest achieved peak accuracies of 99.476% and 98.837% on Dataset-1 (1700 samples) and Dataset-2 (583 samples), respectively, while a Stacking ensemble model reached 100% accuracy on Dataset-3 (30,691 samples). Explainability analyses using SHAP and LIME identified key predictive features such as Liver Function Test, Alcohol Consumption, and Age in Dataset-1; Alkaline Phosphatase, Alamine Aminotransferase, and Aspartate Aminotransferase in Dataset-2; and similar liver biomarkers in Dataset-3. These results demonstrate that ensemble ML models, coupled with XAI methods, provide accurate and transparent early detection of liver disease. The implementation of these models in a user-friendly web application further facilitates practical clinical deployment.