# Enhancing Kidney Disease Diagnosis Using ACO-Based Feature Selection and Explainable AI Techniques
## 4 Methodology
### Data Description and Preprocessing  
The public clinical data used in this research was obtained from Tawam Hospital in Abu Dhabi between January and December 2018 [35] ([[https://figshare.com/articles/dataset/6711155?file=12242270](https://figshare.com/articles/dataset/6711155?file=12242270)]([https://figshare.com/articles/dataset/6711155?file=12242270](https://figshare.com/articles/dataset/6711155?file=12242270)) (accessed on 1 September 2024)). The original dataset included information for 544 patients. However, only the data of 491 patients were considered, eliminating those who were missing baseline serum HgbA1C data [35]. The dataset consists of clinical, social, and physiological information on KD patients, with key factors such as gender, age, history of vascular, hypertension, dyslipidemia medication, smoking, and hypertension (HTN), among many other factors.  
Categorical features include gender and medical history attributes (e.g., diabetes, coronary heart disease, vascular disease, smoking, hypertension, dyslipidemia, obesity, etc.), denoted using binary values (0, 1). The target variable is a binary classification of KD-Yes and KD-No. Table 2 shows a comprehensive overview of these features according to their primary outcome.  
Some steps were incorporated into the data preprocessing stage to ensure that the dataset was suitable for ML analysis. Initially, the dataset was cleaned, and missing values were handled using iterative imputation. Continuous variables were imputed with the mean, and categorical variables were imputed with the most common value according to the criteria in [36].  
Normalization was performed using min-max scaling to rescale categorical and continuous variables, guaranteeing consistency across features. This procedure mitigated potential bias generated by differences in measurement scales and distribution ranges, as shown in the normalization method in Equation (11). This approach makes correct model interpretation quicker and enhances performance.  
\[\mathrm{x_{normalizes}}=\frac{\mathrm{x-min(X)}}{\mathrm{max(X)-min(X)}} \tag{11}\]  
Figure 1: Proposed methodology for predicting KD at an early stage.  
Initially, there was a significant class imbalance in the dataset, with 56 KD-Yes instances (11.41%) out of 491 patients. To address this imbalance, the synthetic minority oversampling method (SMOTE) was used, which generated synthetic samples for the minority class until KD-Yes and KD-No had 435 occurrences each, resulting in a 1:1 ratio. SMOTE uses the k-nearest neighbors (KNN) approach to create new instances of the minority class, ensuring that synthetic samples retain significant feature distributions rather than simple replication.  
To evaluate the influence of SMOTE, we evaluated the model performance before and after resampling using multiple evaluation metrics. Experimental results indicated that the minority class was more effectively detected, without a substantial risk of overfitting, based on the KD-Yes cases (see Section 5 for detailed experimental results). SMOTE maintains overall classification performance while balancing the dataset and improving the model's capacity to predict KD-Yes instances.