Department of Electronics Communication and Engineering, Sri Venkateshwara University College of Engineering, Tirupati
Chronic Kidney Disease (CKD) is a progressive condition, which in most cases can go through without realisation until the late stages, so timely identification and clarification of the condition is important to intervene. This paper presents a machine learning explainable system to predict CKD stage with Light Gradient Boosting Machine (LightGBM), Synthetic Minority Oversampling Technique (SMOTE), explainability with the help of SHAP, and a fuzzy rule-based reasoning system. The data have biochemical, clinical, lifestyle, and urinalysis characteristics related to the severity of CKD. The pipeline of systematic preprocessing was built to address the problem of missing data, coding of nominal data, the normalisation of numerical data, and the large class imbalance with the use of SMOTE. The reason why LightGBM was chosen is that it is efficient and able to capture non-linear and complicated relationships across clinical data. Probability calibration was done using Platt scaling to enhance clinical reliability. SHAP was included to offer global and local interpretability, which would guarantee transparency behind every prediction. A fuzzy reasoning layer, A model that converted model outputs to intuitive linguistic rules, was used to improve clinical understanding. The results of the experiments demonstrate a weighted F1-score of 0.87-0.92, which is an indicator of a high predictive ability. SHAP analysis identified such important biomarkers as GFR, creatinine, and BUN. A graphical user interface was created to provide real-time predictions, SHAP visualisation, and recommendations with personalisation. The hybrid framework shows that the decision-support tool used to assist in making decisions about CKD staging is clinically viable, transparent, and accurate.
Chronic Kidney Disease (CKD) is one of the greatest global health challenges that afflicts over 850 million people worldwide [1]. Clinically, CKD can be characterised by the consistent decrease of kidney ability to filter, often expressed in estimated glomerular filtration rate (eGFR), serum creatinine and proteinuria [1, 2]. Due to CKD being a silent disease in most cases, most patients develop the condition to a complicated stage before they are well attended to, exposing them to cardiovascular issues, hospitalisation, and even death [3]. An increase in cases of diabetes, high blood pressure, and other lifestyle-related illnesses has played a major role in CKD in developing nations [3]. The conventional diagnosis is based on manual analysis of biochemical pointers. This is, however, complicated with complex datasets that have multivariate relationships that cannot easily be established by human evaluation. Machine learning (ML) models have proven to have significant potential in CKD prediction because they are able to process complex clinical data and identify concealed patterns [4, 5]. Random Forest (RF), Logistic Regression (LR), Support Vector Machines (SVM), as well as boosting models, including XGBoost, have demonstrated encouraging performance [4, 6]. Although this has been achieved, the majority of research has been done on binary classification, between CKD and non-CKD, and this constrains clinical relevance to treatment planning since CKD progression is very severe based on the stage of advancement [6, 13]. Another important challenge is interpretability. ML models, especially those based on ensemble and boosting, are considered black boxes (their inner workings are hard to understand) in some way. This limits its implementation in health systems demanding transparent, auditable and clinically interpretable decisions in order to guarantee patient safety and trust [9, 14]. SHAP (SHapley Additive exPlanations) is the solution to this problem by offering mathematically consistent contributions of each feature to the final prediction [9]. Nevertheless, numerical SHAP values can also not be intuitively understood by clinicians. Fuzzy logic, which is based on the human reasoning style, is a natural solution when the model decisions are translated into the form of readable rules [10, 12]. The literature on the prediction of CKD has several research gaps. To begin with, stage-wise classification of CKD is still scanty, with the majority of the studies conducting binary classification as their approaches [13, 16]. Second, the terrible class imbalance in real-world CKD datasets, especially at low stages, can be observed, and the issue is not properly covered in many studies [8]. Third, many ML models employed to predict CKD do not have or lack adequate explainability [14]. Fourth, hybrid systems are uncommon that include hybridisation of ML, SHAP, and fuzzy reasoning. Finally, tools including GUI-based decision-support systems are deployable and are not available, which restricts the application in clinical and screening settings [13]. The proposed study is a bridge between these gaps because it presents a complete explainable model of CKD stage prediction with LightGBM and SMOTE, as well as SHAP and fuzzy reasoning, and a graphical interface. The main findings of the research are the following:
LITERATURE REVIEW
Machine learning has experienced a significant amount of CKD prediction research, with the first models of this type examining the CKD presence by classifying it through the use of random forest (RF), Support Vector Machines (SVM), and Logistic Regression (LR) models, using structured clinical data [4, 5]. RF was effective in predicting because it was robust to noise and had the capacity to predict nonlinear relationships, whereas SVM was effective at dealing with high-dimensional medical data. XGBoost was subsequently enhanced with gradient boosting to achieve better precision, but remained poor at interpretation due to its complicated internal characterisation [6]. One of the most significant weaknesses witnessed in CKD datasets is an extreme imbalance of classes, in which most are of early-stage, and few are of advanced CKD (4-5) stages. Such an imbalance may cause biased model training, which will cause impoverished generalisation on minority classes. Synthetic Minority Oversampling Technique (SMOTE) has already been shown to be efficient in addressing such imbalance by creating synthetic samples in clusters of minority classes, thus enhancing the bias and recall of classifiers [8]. Research that has included SMOTE has had a continued increase in F1-score and sensitivity on underrepresented CKD groups. Machine learning must be adopted in healthcare because it has to be interpretable. One of the most mathematically sound schemes to explain model choices is SHAP, which is an algorithm introduced by Lundberg and Lee that computes the marginal contribution of each feature to the output [9]. SHAP has demonstrated itself to be a promising predictive model in areas of diabetes, cardiovascular disease, and oncology, yet it is hardly used to explain CKD staging. Arvind et al. noted that SHAP could be appropriate in the clinical setting, particularly because it could provide explanations that corresponded to physician reasoning and regulatory sustainability [14]. In addition to numerical interpretability, fuzzy logic provides the ability to think in a human manner with the use of linguistic representations like low GFR, moderately high creatinine, or high BUN. Fuzzy logic, originally introduced by Zadeh [10] and extended by Kosko [11], is highly used in clinical diagnostic systems because it is more flexible in uncertainty management and its interpretation ability. Son et al. proved that the use of fuzzy rule-based reasoning has been found to increase both clinician trust and enhance the usability of the decision-support system [12]. The latest systematic reviews of CKD prediction models highlight various gaps in the current literature that remain unaddressed [13, 16]. These gaps are a scarcity of research on stage-by-stage classification, inadequate work with skewed datasets, little incorporation of explainability methods like SHAP, and the absence of solutions linking ML with fuzzy and user interfaces. Moreover, most of the models are at the stage of academic research and do not become real-world clinical solutions because of the lack of deployable GUI-based solutions [13]. Resting on the above observations, it is evident that there is a need to have a holistic CKD prediction framework that:
All these research gaps are discussed in the current study, which is why it can be regarded as an important contribution to the CKD prediction literature.
METHODOLOGY
The proposed system of predicting CKD incorporates the preprocessing of data, balancing of classes, machine learning classification, probability calibration, explainability using SHAP, reasoning rules (fuzzy), and deployment into the GUI. The pipeline is multistage and therefore has high predictive accuracy, transparency and clinical usability.
Figure 1 Flow chart showing Work Flow
Dataset
The data includes demographic, biochemical, lifestyle, and laboratory measurements that are related to kidney health. Some of the important numeric biomarkers are serum creatinine, estimated glomerular filtration rate (GFR), blood urea nitrogen (BUN), serum calcium, blood pressure (BP), and oxalate. These categorical variables are ANA, hematuria, smoking status, type of diet, physical activity, use of painkillers, alcohol consumption, and family history. The severity rates of CKD (Stage 0-5) are in accordance with KDIGO clinical staging guidelines [1, 2].
Preprocessing
The reason why preprocessing is necessary is because of missing values, irregular formatting and feature types. The subsequent steps were used:
Column Cleaning
All the columns were normalised to lowercase, and any unnecessary characters were removed to maintain consistency.
Missing Value Handling
Outlier Treatment
An outlier may be due to a physiological anomaly or a difference in measurement. The numerical attributes were standardised through robust scaling instead of removal to remove the effect of extreme values.
Encoding of Categorical Variables.
To change categorical data into numerical form, the following was used:
These encodings are compatible with LightGBM in optimising the use of categorical inputs.
Standardisation of Numerical Features. Numerical characteristics were standardised to a zero mean and unit variance, which minimises variance-related bias in the training of models.
Class Balancing using SMOTE
CKD resources are characterised by a large amount of imbalances, with early-stage cases being overrepresented and late-stage cases underrepresented. This imbalance may make the classifier biased towards of majority classes and hence less generalizable. To solve this, the Synthetic Minority Oversampling Technique (SMOTE) was only applied to the training set, producing synthetic samples on minority class clusters [8]. This enhanced the recall of Stages 4 and 5 as well as avoided overfitting the validation set.
LightGBM Classification Model
This model uses the principle that the user is required to use the available classification model to process the data and compare it with the model, and then decide on which data can be incorporated into the model. LightGBM was chosen because of its speed, the possibility to approximate nonlinear relations, and good results in structured healthcare data [7]. These were the hyperparameters used:
The leaf-wise growth strategy and splitting using histograms of LightGBM are beneficial in mixed-type feature datasets in medicine.
Probability Calibration
Clinical decision-making requires more than just accuracy, but confidence in the probability is of great importance. The LightGBM outputs were scaled using Platt scaling (sigmoid calibration) to make sure that the LightGBM scalings matched clinical probability expectations. Such calibration increases the credibility of the predicted probabilities of stages, particularly at the boundaries of classes.
SHAP Explainability Layer
IT was combined with SHAP (Shapley Additive explanations):
Global SHAP
Local SHAP
This dual-level interpretability complements clinical confidence and regulatory (2) suitability [9, 14].
Fuzzy Rule-Based Reasoning
A fuzzy reasoning layer was created to convert the SHAP values into numerical data to clinical language. Medical logic and domain experience generated rules as:
Graphical User Interface (UI)
Tkinter was used to create the GUI, and it combines all the model elements:
The interface will convert the ML model into a more accessible clinical decision-support tool, and it will fill the gaps of deployment previously noted in recent reviews [13].
Figure 2 Flow Chart Showing System Architecture
RESULTS & DISCUSSIONS
This part discusses the performance analysis of the proposed explainable CKD staging system, such as classification results, SHAP interpretability analysis, case studies and comparisons with other literature. These findings affirm the fact that LightGBM, coupled with SMOTE balancing and XAI mechanisms, are highly accurate, robust, and interpretable in clinical terms.
Performance Metrics
Accuracy, precision, recall, weighted F1-score and confusion matrix were used to evaluate the model. The weighted F1-score was chosen because of the issue of the imbalance of the classes. The LightGBM-SMOTE model had a good performance in multi-classes with high generalizability, even at all stages of CKD.
Table 1 Performance Metrics
|
Metric |
Value |
|
Accuracy |
0.85 – 0.90 |
|
Weighted Precision |
0.86 – 0.91 |
|
Weighted Recall |
0.85 – 0.89 |
|
Weighted F1-Score |
0.87 – 0.92 |
|
Training Time |
< 5 seconds |
Interpretation: The large F1-score means that the performance is not biased at any of the stages, including those of minority classes, which proves that SMOTE was effective at enhancing the classification fairness.
Stage-Wise Classification Report.
Stage metrics: A high precision and recall rate is obtained in early and moderate stages of CKD. Stages 4 and 5, which are usually underrepresented, also attained reasonable recall because of the SMOTE-based class balancing.
Table 2 Stage-Wise Precision, Recall and F1-Score
|
CKD Stage |
Precision |
Recall |
F1-Score |
Interpretation |
|
0 (Normal) |
High |
High |
High |
Correct identification of healthy cases |
|
1 (Mild) |
Moderate–High |
Moderate |
Moderate–High |
Good sensitivity for mild abnormalities |
|
2 (Mild) |
High |
High |
High |
Strong discrimination of early CKD |
|
3 (Moderate) |
Good |
Good |
Good |
Reliable identification of moderate CKD |
|
4 (Severe) |
Moderate |
Moderate |
Moderate |
Improved performance after SMOTE |
|
5 (End Stage) |
High |
Moderate–High |
Moderate–High |
Clear detection of advanced renal failure |
Interpretation: The mock performance is in line with the nephrology expectations and KDIGO clinical criteria.
Global SHAP Analysis
SHAP values of the world determine the important predictors of all patients. The best characteristics are clinical similarities:
Table 3 Optimal Features Found by SHAP and Clinical Significance
|
Rank |
Feature |
Clinical Relevance |
|
1 |
GFR |
Primary measure of filtration rate |
|
2 |
Creatinine |
Indicator of renal deterioration |
|
3 |
BUN |
Elevated levels signal waste buildup |
|
4 |
Calcium |
Important for bone mineral regulation |
|
5 |
Oxalate |
Associated with kidney stone formation |
|
6 |
Blood Pressure |
Predictor of CKD progression |
SHAP Interpretability on a Local Scale.
Local SHAP values serve to make predictions on individual patients. These reveals:
For example:
Figure 3 Example of SHAP Interpretability
Case Studies
The case studies demonstrate that the system is capable of distinguishing between the stages of CKD:
Case 1 -- Stage 0 (Normal Function)
Case 2 -- Stage 2 (Mild CKD)
Case 3 -- Stage 3 (Moderate CKD)
Case 4 - Stage 5 (End Stage Renal Disease).
GUI Performance Evaluation
This GUI incorporates prediction, SHAP visualisation, and fuzzy rule explanations.
Strengths include:
The Visualisation of the stage bar is to be visualised intuitively. This responds to one of the significant gaps identified in CKD ML literature on the absence of deployable systems.
Output Result for Stage 0: NO CKD
CONCLUSION
FUTURE WORK
To assess the system's generalizability, dependability, and acceptability among nephrologists and other healthcare professionals, clinical validation through multi-hospital trials is crucial.
REFERENCE
Govardan Sai Palla*, Dr. I. Kullayamma, Explainable Chronic Kidney Disease Prediction Using LightGBM with Shap and Fuzzy Rule-Based System, Int. J. Sci. R. Tech., 2025, 2 (12), 174-184. https://doi.org/10.5281/zenodo.17918804
10.5281/zenodo.17918804