This project applies machine learning models to predict liver disease using the Indian Liver Patient Dataset (ILPD). It focuses on optimizing recall for early detection while maintaining model interpretability using SHAP analysis.
- Source: UCI ILPD Dataset
- Records: 583 patients (416 with liver disease, 167 without)
- Logistic Regression
- Random Forest
- XGBoost (final selected model)
- XGBoost ROC AUC: 0.7341
- Recall (Liver Disease class): 90%
- Threshold-Optimized for Sensitivity
- SHAP explainability used to identify key biomarkers
- Stratified train-test split & cross-validation
- Feature scaling & encoding
- Classification report, confusion matrix, ROC curve
- SHAP summary & force plots for interpretability
- Threshold tuning using F1-maximizing precision-recall analysis
XGBoost was selected for its high recall, making it ideal for screening applications where minimizing false negatives is critical. SHAP plots were used to interpret the model’s focus on biomarkers like bilirubin, SGOT, SGPT, and albumin.
- Total Bilirubin
- Direct Bilirubin
- SGOT (AST)
- SGPT (ALT)
- Albumin
- Albumin/Globulin Ratio
These features consistently contributed most to the model’s predictions, highlighting their clinical relevance in early detection of liver disease.
- Hyperparameter tuning (Optuna/GridSearchCV)
- Handling class imbalance with SMOTE/ADASYN
- Deploying via Streamlit for interactive clinical screening
- External validation on new liver health datasets




