Spaces:
Sleeping
Sleeping
File size: 2,750 Bytes
87bbe58 0ff826a 87bbe58 8f61851 87bbe58 0ff826a 87bbe58 0ff826a 8f61851 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | ---
title: CKD Prediction System
emoji: π«
colorFrom: blue
colorTo: indigo
sdk: gradio
sdk_version: 5.23.3
app_file: app.py
pinned: false
license: mit
---
# Chronic Kidney Disease (CKD) Prediction System
**Research Project | PAF-IAST | HEC-Funded**
**Principal Investigator:** Dr. Muhammad Rizwan
---
## Overview
This web application provides an AI-powered screening tool for **Chronic Kidney Disease (CKD)**
based on routine blood test parameters. It was developed as part of a peer-reviewed research study
conducted at the **Pakistan Air Force Institute of Aerospace Technology (PAF-IAST)** under an
HEC-funded project.
The application accepts 21 blood parameters as input and returns a binary prediction
(**CKD / No CKD**) along with class probabilities.
---
## Model
| Property | Details |
|---|---|
| Algorithm | Random Forest Classifier |
| Accuracy | ~95.5% |
| F1 Score | ~95.4% |
| ROC-AUC | ~98.5% |
| Validation | 5-fold Stratified Cross-Validation |
| Explainability | SHAP + LIME |
The Random Forest model was selected after benchmarking 8 classifiers including
XGBoost, CatBoost, Gradient Boosting, AdaBoost, Logistic Regression, Decision Tree,
and K-Nearest Neighbors.
---
## Input Features
The model uses the following 21 blood test parameters:
**Demographic:** Sex, Age
**CBC:** Haemoglobin, Hematocrit, RBC Count, WBC Count, Platelet Count
**Red Cell Indices:** MCH, MCHC, MCV, RDW-SD, MPV, PCT, PDW
**Differential Count:** Lymphocytes, Monocytes, Polymorphs, Eosinophils
**Kidney Function:** Creatinine, Blood Urea, GFR
---
## Key Findings (from SHAP Analysis)
Top predictive features (in order of importance):
1. **Creatinine** β strongest CKD indicator
2. **GFR** (Glomerular Filtration Rate) β inverse relationship with CKD
3. **Urea** β elevated in kidney dysfunction
4. **RDW-SD** β red cell distribution width
5. **MPV** β mean platelet volume
---
## Dataset
- **Samples:** 398 patients
- **Class distribution:** CKD: 241 (60.6%) | No CKD: 157 (39.4%)
- **Missing values:** < 1.5% (imputed with zero-fill)
- **No duplicates**
---
## Files in this Space
```
app.py β Gradio application
requirements.txt β Python dependencies
Random_Forest.pth β Trained Random Forest model (joblib format)
README.md β This file
```
---
## Disclaimer
> This application is intended **for research and educational purposes only**.
> It does **not** constitute medical advice, diagnosis, or treatment.
> All clinical decisions must be made by a licensed and qualified physician.
---
## Citation
If you use this work, please cite the associated research paper (details to be added upon publication).
**Contact:** Dr. Muhammad Rizwan | PAF-IAST |