Abstract
Accurate classification of vascular complications is essential for identifying clinically relevant patterns and supporting data-driven risk assessment. This study proposes an interpretable machine learning framework that integrates feature selection, hyperparameter optimization, and decision-rule extraction for classifying vascular complication status. The proposed approach was evaluated using a dataset comprising 91 observations distributed across three categories: patients without complications, patients with microvascular complications, and patients with macrovascular complications. Initially, Random Forest feature importance was employed to rank 47 demographic, clinical, and biochemical predictors, and different feature subsets were systematically evaluated to identify an effective configuration. Subsequently, Optuna with the Tree-structured Parzen Estimator (TPE) was utilized to optimize Random Forest hyperparameters, while five-fold nested cross-validation was applied to assess predictive performance. The results demonstrated that the proposed framework achieved a mean accuracy of 95.61% ± 2.20%, a weighted F1-score of 95.59% ± 2.21%, and a macro F1-score of 95.62% ± 2.20% using only 15 predictors, corresponding to a 68.09% reduction in feature dimensionality without compromising classification performance. The proposed method outperformed nine benchmark machine learning algorithms, including XGBoost, CatBoost, and Extra Trees. An additional stability analysis using 10 repetitions of five-fold nested cross-validation, with feature-count selection performed within the inner folds, yielded a mean accuracy of 95.71% ± 0.81%, a weighted F1-score of 95.70% ± 0.81%, and a macro F1-score of 95.72% ± 0.80%, indicating relatively consistent internal predictive performance across different data partitions. Furthermore, class-specific ROC-AUC values of 0.995, 0.985, and 0.967 indicated strong discriminative performance across the three clinical categories. To enhance interpretability, IF–THEN decision rules were extracted from the optimized Random Forest model and ranked according to their predictive characteristics. Overall, the findings suggest that the proposed framework can provide accurate and interpretable classification of vascular complications using a reduced set of clinical and biochemical predictors. Nevertheless, external validation on larger and more diverse patient cohorts is necessary before clinical implementation.
1. Introduction
Vascular complications are major contributors to morbidity and mortality in patients with type 2 diabetes mellitus (T2DM), arising from complex interactions among metabolic, inflammatory, hemodynamic, and biochemical processes [1,2,3,4]. These complications are generally categorized as microvascular, affecting the retina, kidneys, and peripheral nerves, or macrovascular, involving the coronary, cerebral, and peripheral arterial systems [1,2]. Although their clinical manifestations differ, overlapping risk factors and biological mechanisms can complicate their differentiation. Age, diabetes duration, metabolic abnormalities, inflammatory markers, and circulating biomarkers may exhibit complex and interacting relationships with vascular complication status [2,3,4]. Consequently, integrating clinical and biochemical information may provide a more comprehensive representation of these complication categories than evaluating individual indicators in isolation.
Machine learning (ML) methods provide opportunities to identify nonlinear relationships and interactions within heterogeneous clinical datasets. Random Forest (RF), in particular, can accommodate complex predictor relationships and provide feature-importance estimates [5]. However, clinical datasets frequently contain numerous candidate predictors relative to their sample sizes, increasing the risk of overfitting and unstable performance estimates [6]. Feature selection, hyperparameter optimization, and rigorous validation are therefore essential for developing reliable classification frameworks [7]. Interpretability is equally important in clinical applications, where predictive performance alone may be insufficient to explain model decisions. Feature-importance measures and explicit IF–THEN decision rules can improve the transparency of learned classification patterns, although data-derived thresholds should not be interpreted as clinically validated diagnostic criteria [8].
Previous studies have demonstrated the potential of ML for diabetes-related vascular complication assessment. Schallmoser et al. [9] investigated longitudinal prediction of microvascular and macrovascular outcomes using electronic health records from 18,163 individuals, while Nicolucci et al. [10] developed XGBoost models for predicting multiple complications using records from 147,664 patients and performed external validation. Other investigations focused on specific complications: Liu et al. [11] reported an AUC of 0.945 for XGBoost-based peripheral vascular disease prediction, and Yin et al. [12] obtained an AUC of 0.966 for diabetic nephropathy prediction using selected clinical and metabolomic features. Ye et al. [13] examined four diabetes-related complications using multiple ML algorithms and SHAP explanations, whereas Rashid et al. [14] evaluated the screening of microvascular complications using a smaller clinical cohort. Similarly, Wen et al. [15] combined ensemble classifiers with SHAP and LIME for diabetic nephropathy assessment. Collectively, these studies support the value of feature selection and explainable ML, although their primary objectives generally involved individual complication prediction, complication-specific screening, or longitudinal risk assessment.
Recent investigations have further expanded the methodological scope of this field. Zhang et al. [16] compared 29 algorithms for macrovascular complication prediction and reported an external validation AUC of 0.745, highlighting the challenges of generalizability. Zamani et al. [17] proposed a stacked multi-label framework for predicting co-occurring microvascular and macrovascular complications, achieving an AUC of 0.857 ± 0.032. Zhang et al. [18] developed an explainable XGBoost model for distinguishing diabetic nephropathy from diabetic retinopathy, achieving an AUC of 0.997 in a held-out internal validation cohort. Beyond diabetes-specific applications, Wang et al. [19] demonstrated the feasibility of extracting interpretable decision rules from Random Forest ensembles in breast cancer classification. Nevertheless, evidence synthesis by Kanbour et al. [20] identified a reduction in predictive performance between internal and external validation of diabetic microvascular complication models. Similarly, Ghafoor et al. [21] highlighted limited external validation, insufficient calibration assessment, and methodological bias across existing diabetes complication prediction studies.
Despite these advances, relatively limited attention has been devoted to directly distinguishing among patients without vascular complications, those with microvascular complications, and those with macrovascular complications within a unified three-class classification framework. Existing studies have predominantly addressed individual complications, longitudinal risk prediction, or multi-label modeling of co-occurring outcomes [9,11]. Furthermore, although SHAP and LIME have been widely applied to identify influential predictors, they do not necessarily provide explicit, class-specific combinations of clinical and biochemical thresholds. The integration of feature reduction, optimized classification, rigorous internal validation, and interpretable IF–THEN rule extraction therefore represents a relevant direction for investigating existing vascular complication categories. However, conclusions regarding predictive stability and clinical generalizability must account for sample size, model-selection procedures, and the absence of independent external validation.
Accordingly, this study investigates an explainable ML framework for three-class classification of vascular complication status in patients with T2DM. Its contribution lies not in introducing a new classification algorithm, but in integrating three complementary objectives within a distinct clinical classification task. First, RF-based feature ranking is used to investigate whether a reduced predictor subset can preserve classification performance. Second, Optuna-assisted hyperparameter optimization and nested cross-validation are employed to evaluate predictive performance and compare the proposed framework with benchmark algorithms, supplemented by repeated nested cross-validation to assess internal stability. Third, class-specific IF–THEN rules are extracted to describe multivariable decision patterns involving biomarkers such as GDF-15, FGF-21, adiponectin, and hsCRP, together with clinical characteristics including diabetes duration. The extracted rules are additionally examined using out-of-fold validation to assess their reliability on unseen observations. Overall, the study aims to provide an exploratory, interpretable analysis of existing vascular complication categories rather than establish prospective risk prediction or clinically validated diagnostic thresholds. Independent external validation remains necessary before clinical application.
2. Materials and Methods
2.1. Dataset Description
The dataset comprised 91 observations categorized into three classes according to the presence and type of vascular complications. Class 0 represented patients without complications (n = 30), Class 1 included patients with microvascular complications (n = 30), and Class 2 consisted of patients with macrovascular complications (n = 31). A total of 47 candidate predictors, encompassing demographic, clinical, and biochemical variables, were considered for the classification task.
The study population was recruited from patients with type 2 diabetes mellitus attending the Endocrinology Outpatient Clinic of a tertiary university hospital in Elazığ, Türkiye. Patients aged 30–70 years with an established diagnosis of type 2 diabetes mellitus were considered eligible for inclusion. Diabetes diagnosis was established by an endocrinologist according to the American Diabetes Association diagnostic criteria. The exclusion criteria included additional diseases unrelated to diabetes and its complications, antihyperlipidemic treatment, psychiatric disorders, active or recent infections, and malignancy. Demographic characteristics, medical history, diabetes duration, and relevant biochemical measurements were obtained through clinical assessment and laboratory investigations.
Patients were assigned to the three diagnostic groups according to their clinically established vascular complication status. The no-complication group included patients without documented diabetic vascular complications. The microvascular complication group comprised patients diagnosed with diabetic retinopathy, neuropathy, or nephropathy, whereas the macrovascular complication group included patients with cardiovascular disease, cerebrovascular complications, or peripheral vascular disease. Importantly, the study focused on patients with isolated microvascular or isolated macrovascular complications. Patients with co-occurring microvascular and macrovascular complications were not included in the classification framework, and no combined-complication category was considered. Thus, the three classes represented distinct clinical categories: no vascular complications, isolated microvascular complications, and isolated macrovascular complications. The presence and type of vascular complications were determined through clinical evaluation and confirmed by the relevant specialist physicians.
Table 1 presents the baseline clinical and biochemical characteristics of the study population across the three groups, with continuous variables expressed as mean ± standard deviation (SD). The descriptive statistics reveal differences in both the mean values and variability of several clinical and biochemical parameters, including age, diabetes duration, HbA1c, GDF-15, FGF-21, homocysteine, and oxidized LDL. Notably, the microvascular group exhibited a higher mean GDF-15 level, whereas the macrovascular group showed higher mean age and longer diabetes duration. However, these observations are descriptive and do not establish statistically significant differences between the groups.
Table 1.
Baseline clinical and biochemical characteristics of the study population.
These variables were subsequently evaluated within the proposed machine learning framework to identify informative predictors associated with vascular complication status. The relatively balanced class distribution facilitated comparative evaluation of classification performance, while the observed variability in clinical and biochemical measurements provided a basis for investigating differences among the three vascular complication categories.
Importantly, the present study was designed as a cross-sectional classification analysis of established vascular complication categories rather than a prospective risk-prediction study. The exact temporal relationship between clinical and biochemical measurements and the initial diagnosis of vascular complications could not be established from the available records. Accordingly, the reported classification performance reflects the discrimination of existing clinical categories within the available cohort and should not be interpreted as evidence of prospective predictive capability or independent causal associations.
2.2. Proposed Method
The proposed method aims to identify informative features, evaluate classification performance, and extract interpretable decision rules from a Random Forest model. As illustrated in Figure 1, the proposed framework consists of five main stages: data preprocessing, feature selection and feature-count optimization, model optimization and performance evaluation, decision-rule extraction, and rule optimization.
Figure 1.
Overview of the proposed framework, including feature selection and optimization, model performance evaluation, decision-rule extraction, and rule optimization.
2.2.1. Data Preprocessing
Data preprocessing was performed within the machine learning pipeline to minimize the risk of information leakage during model development and evaluation. Numerical predictors were processed using mean imputation, implemented through the SimpleImputer function in scikit-learn. Missing-value replacement parameters were estimated exclusively from the corresponding training partition and subsequently applied to the validation or test partition. No feature scaling or normalization was applied, as the Random Forest classifier is based on recursive feature partitioning and does not require standardized predictor scales.
Feature ranking was performed using Random Forest impurity-based feature importance, and the selected feature subset was determined independently within each training partition. During nested cross-validation, imputation and feature selection were fitted separately within each inner training fold during hyperparameter optimization. Following optimization, the complete pipeline was refitted on the outer training partition and evaluated on the held-out outer test fold. Consequently, no information from the outer test partitions was used during imputation, feature selection, or hyperparameter optimization.
No separate outlier removal, winsorization, or outlier-based transformation procedure was implemented in the modeling pipeline. Therefore, observations were not automatically excluded based on statistical outlier thresholds. Regarding categorical predictors, the numerical representations provided in the original dataset codebook were directly used in the modeling pipeline without applying an additional one-hot encoding transformation. The categorical variables included sex (0 and 1), smoking (1 = yes, 2 = no), alcohol use (1 = yes, 2 = no), comorbidity status (1 = present, 2 = absent), social security (1 = present, 2 = absent), and family history of diabetes (1 = present, 2 = absent). Education level (1–8) and family income (1–3) were represented using ordinal numerical codes, following their respective predefined category orders. The binary variables were numerically represented solely to distinguish between their two categories and were not intended to indicate quantitative differences. Since these variables contain only two categories, their numerical representation allows the Random Forest decision trees to distinguish between the two groups through threshold-based splits. For education level and family income, the numerical codes reflect the predefined ordinal structure of the categories. Nevertheless, this representation assumes an ordered relationship between categories and may constrain the possible partitions considered by individual decision trees. This aspect is acknowledged as a methodological consideration when interpreting the model results.
2.2.2. Feature Importance and Feature-Count Selection
Random Forest feature importance was used to rank candidate predictors. To examine the effect of dimensionality, six feature counts (5, 10, 15, 20, 25, and the complete 47-feature set) were investigated. For each candidate count, the feature-ranking and selection procedure was applied within model training, and predictive performance was summarized using mean Accuracy, Weighted F1-score, and Macro F1-score across outer folds. The Top-15 configuration was retained because its reported performance matched that of the Top-25 and full-feature configurations while using fewer predictors. The final feature count was therefore determined from the experimental comparison rather than fixed at the outset.
2.2.3. Model Optimization and Performance Evaluation
The selected feature subset was used to train a Random Forest classifier, whose hyperparameters were optimized using Optuna with the Tree-structured Parzen Estimator (TPE) sampler. The optimization process explored several hyperparameters, including the number of trees, maximum tree depth, minimum samples required for node splitting and leaf formation, maximum features considered at each split, splitting criterion, bootstrap strategy, and class-weight configuration. Candidate hyperparameter configurations were evaluated using stratified three-fold inner cross-validation, with an optimization objective assigning equal weight to Accuracy and Weighted F1-score.
To ensure a consistent experimental comparison, the proposed Random Forest framework and all nine benchmark machine learning algorithms were evaluated under a unified nested cross-validation protocol consisting of five stratified outer folds for performance evaluation and three stratified inner folds for hyperparameter optimization. Optuna–TPE was applied independently to each algorithm using algorithm-specific hyperparameter search spaces. The optimization budget was fixed at 40 trials per outer fold, corresponding to 200 trials per algorithm across the original five-fold evaluation. A base random seed of 42 was used, with fold-dependent seeds applied during inner cross-validation and Optuna sampling. Hyperparameter selection and model fitting were performed exclusively within the corresponding outer training partitions. Preprocessing procedures were adapted to the requirements of individual algorithms, including fold-based imputation and feature scaling where applicable. All algorithms were evaluated using identical outer data partitions and performance metrics, ensuring comparability while accommodating algorithm-specific preprocessing requirements.
Classification performance was assessed using Accuracy, Weighted F1-score, and Macro F1-score, with results summarized as mean ± standard deviation across the five outer folds. In addition, out-of-fold class predictions and predicted probabilities, where available, were aggregated to construct the pooled confusion matrix and class-specific receiver operating characteristic (ROC) and precision–recall curves. This evaluation strategy was designed to reduce optimistic performance estimates associated with hyperparameter tuning and facilitate a systematic comparison between the proposed framework and competing machine learning approaches.
2.2.4. Rule Evaluation and Selection
The extracted rules were evaluated on the same dataset used to fit the final model. Reported rule characteristics included covered sample count and proportion (coverage), rule precision and recall, rule F1-score, covered-sample Accuracy, Weighted F1-score, Macro F1-score, and fidelity, defined as agreement between the rule prediction and the full Random Forest prediction among covered observations. Rules covering fewer than three observations were excluded. Remaining rules were ordered by descending precision, fidelity, and coverage, followed by ascending number of conditions, and up to 50 were retained. This stage constitutes rule filtering and ranking rather than a separate search-based optimization procedure. Because these rule scores are in-sample, they describe the final model and are not independent validation estimates.
2.2.5. Repeated Nested Cross-Validation and Stability Assessment
To further assess the stability of the proposed framework and reduce dependence on a single data partition, an additional repeated nested stratified cross-validation experiment was conducted. The evaluation employed 10 repetitions of five-fold outer cross-validation, resulting in 50 outer-fold evaluations. Each outer test partition contained 18 or 19 observations, while three-fold inner cross-validation was used for model selection and hyperparameter optimization.
Within each outer training partition, Random Forest-based feature importance was used to rank the candidate predictors. Six feature-count configurations (5, 10, 15, 20, 25, and all 47 predictors) were considered. Unlike the initial feature-count comparison, feature-count selection was incorporated directly into the inner cross-validation procedure alongside hyperparameter optimization. Optuna with the Tree-structured Parzen Estimator (TPE) sampler was employed using 40 optimization trials for each outer-fold evaluation. The optimization objective assigned equal weight to Accuracy and Weighted F1-score.
All imputation, feature ranking, feature-count selection, and hyperparameter optimization procedures were performed exclusively within the corresponding training partitions. Following optimization, the complete pipeline was refitted on the outer training data and evaluated using the held-out outer test observations.
Classification performance was assessed using Accuracy, Weighted F1-score, and Macro F1-score. For each repetition, predictions from the five outer test folds were aggregated to calculate repetition-level performance metrics. The mean and standard deviation of these metrics were subsequently calculated across the 10 repetitions. In addition, conditional patient-level bootstrap resampling was performed using 2000 bootstrap iterations to estimate 95% uncertainty intervals for the main evaluation metrics. In each iteration, 91 patients were sampled with replacement from the original cohort. Importantly, all 10 out-of-fold predictions corresponding to each selected patient were retained together and treated as a patient-level cluster rather than as independent observations. The corresponding true class labels were replicated across the 10 repetitions, and Accuracy, Weighted F1-score, and Macro F1-score were recalculated for each bootstrap sample. The 2.5th and 97.5th percentiles of the resulting metric distributions were used to determine the 95% bootstrap confidence intervals. These intervals represent conditional uncertainty estimates based on the available patient cohort and repeated cross-validation predictions; they should not be interpreted as evidence of generalizability to independent patient populations.
Feature-selection stability was further assessed by recording the frequency with which each predictor and feature-count configuration was selected across the 50 outer-fold evaluations. This supplementary analysis was designed to investigate the sensitivity of the complete modeling procedure to changes in training and test partitions. The detailed preprocessing settings, Random Forest hyperparameter search space, optimization budget, cross-validation configuration, and reproducibility parameters employed in the repeated nested cross-validation experiment are summarized in Table 2.
Table 2.
Experimental configuration and reproducibility details of the proposed Random Forest framework.
3. Results
3.1. Feature-Count Optimization and Selection
The classification performance of the Random Forest model optimized using Optuna (TPE) varied according to the number of features selected through the feature importance-based selection approach. The comparative results of these different feature subsets, evaluated across five outer folds of nested cross-validation, are presented in Table 3.
Table 3.
Performance comparison of Random Forest with Optuna (TPE) optimization using different numbers of importance-selected features. Results are presented as mean ± standard deviation across five outer folds of nested cross-validation.
As observed in Table 3, the model trained with the top-5 features achieved the lowest performance, with a mean Accuracy of 92.34%, Weighted F1-score of 92.22%, and Macro F1-score of 92.28%. Increasing the number of selected features to 10 improved the mean Accuracy to 94.56%. The highest mean classification performance was achieved by the top-15, top-25, and full 47-feature configurations, each attaining an Accuracy of 95.61% ± 2.20%, Weighted F1-score of 95.59% ± 2.21%, and Macro F1-score of 95.62% ± 2.20%. In contrast, the top-20 configuration exhibited a slight reduction in predictive performance.
These findings suggest that increasing the number of input features does not necessarily lead to improved classification performance and that a relatively compact feature subset may preserve predictive effectiveness. In particular, the top-15 configuration reduced the input dimensionality by 68.09% compared with the complete 47-feature set while maintaining identical observed mean performance across the three evaluation metrics. The relatively low standard deviations across the five outer cross-validation folds also indicate limited variability in the observed performance estimates, although these results should be interpreted in the context of the limited sample size. Thus, the top-15 configuration was identified as the most parsimonious alternative among the configurations achieving the highest observed mean classification performance.
Importantly, each feature-count configuration was evaluated independently using nested cross-validation, with feature ranking and hyperparameter optimization performed exclusively within the corresponding training partitions. The top-15 configuration was subsequently selected based on the comparison of the outer cross-validation results, as it represented the smallest feature subset achieving the highest observed mean Accuracy. Therefore, the reported performance corresponds to the nested cross-validation estimate for the fixed top-15 configuration rather than an independently validated estimate of the complete feature-count selection procedure. Consequently, the feature-count comparison should be regarded as an exploratory assessment of the relationship between input dimensionality and predictive performance, rather than definitive evidence of the superiority of a particular feature subset.
3.2. Feature Selection Stability and Learning Behavior
As shown in Figure 2a, 12 predictors were selected across all five outer folds, indicating a consistent pattern in the feature selection process. IL-6 and adiponectin were selected in three folds, while creatinine was selected in two folds. The remaining predictors appeared in only one fold. Although 15 features were selected in each outer fold, a total of 20 distinct predictors were identified across the five folds, reflecting some variability in feature selection.
Figure 2.
Feature selection stability and learning behavior of the Top-15 Random Forest model: (a) frequency of feature selection across five outer folds of nested cross-validation; (b) training and cross-validation accuracy as a function of training-set size, evaluated using only the training partition of the first outer fold.
Figure 2b presents the learning curve obtained from the training partition of the first outer fold. Cross-validation accuracy increased from approximately 75% to 93% as the number of training samples increased, whereas training accuracy remained between approximately 96% and 99%. The difference between training and validation accuracy decreased with increasing sample size, although a small gap remained. These observations describe the learning behavior of the model within the evaluated training partition.
3.3. Comparative Performance Analysis
To ensure a fair and consistent comparison, all benchmark algorithms were optimized using Optuna and evaluated under the same nested cross-validation protocol as the proposed Random Forest framework. Identical data partitions, preprocessing procedures, and evaluation metrics were employed across all models, providing a standardized basis for comparative performance analysis. As illustrated in Figure 3, the proposed method was compared with nine benchmark machine learning algorithms using three evaluation metrics: Accuracy, Weighted F1-score, and Macro F1-score. The proposed method achieved a mean Accuracy of 95.61% ± 2.20%, a mean Weighted F1-score of 95.59% ± 2.21%, and a mean Macro F1-score of 95.62% ± 2.20%. Among the benchmark models, XGBoost achieved the highest mean performance, with corresponding values of 93.45% ± 4.04%, 93.34% ± 4.13%, and 93.40% ± 4.06%, respectively. Compared with XGBoost, the proposed method demonstrated observed improvements of 2.16, 2.25, and 2.22 percentage points across the three metrics. CatBoost and Extra Trees also demonstrated relatively strong classification performance, achieving mean Accuracy values of 92.34% and 92.28%, respectively. AdaBoost and LDA obtained mean Accuracy values of 91.29% and 88.01%, whereas Decision Tree, SVM, KNN, and MLP exhibited comparatively lower performance. Furthermore, the proposed method yielded the lowest standard deviations across all three evaluation metrics, indicating relatively consistent performance across the cross-validation folds. Overall, these findings suggest that the proposed framework achieved the highest observed mean classification performance among the evaluated algorithms while maintaining comparatively low variability across the validation folds.
Figure 3.
Comparison of the proposed method and nine benchmark machine learning models in terms of (a) mean Accuracy, (b) mean Weighted F1-score, and (c) mean Macro F1-score. Error bars represent the standard deviations across cross-validation folds.
3.4. ROC and Precision–Recall Analysis
As shown in Figure 4a, the proposed method achieved high discrimination performance across the three classes based on the out-of-fold (OOF) predictions obtained through nested cross-validation. The one-vs-rest ROC analysis yielded AUC values of 0.995, 0.985, and 0.967 for Classes 0, 1, and 2, respectively. Class 0 exhibited the highest AUC, followed by Classes 1 and 2. All three ROC curves remained close to the upper-left region of the plot, indicating a high true positive rate at relatively low false positive rates.
Figure 4.
Discriminative performance of the Top-15 Random Forest model based on out-of-fold predictions from nested cross-validation: (a) one-vs-rest receiver operating characteristic (ROC) curves with class-specific area under the curve (AUC); (b) one-vs-rest precision–recall curves with average precision (AP) for each class.
Figure 4b presents the corresponding one-vs-rest precision–recall curves. The average precision (AP) values were 0.987, 0.963, and 0.959 for Classes 0, 1, and 2, respectively. Class 0 achieved the highest AP, while Classes 1 and 2 showed slightly lower values. Precision remained relatively high across most recall levels, although reductions were observed at higher recall values, particularly for Class 2. Overall, the ROC and precision–recall analyses indicate that the proposed method maintained relatively high discriminative performance across all three classes, with some variation in class-specific results.
As shown in Figure 5, the confusion matrix obtained from the out-of-fold (OOF) predictions of the proposed method using nested cross-validation indicates an overall classification accuracy of 95.60%. Of the 91 samples, 87 were correctly classified, while four were misclassified. For Class 0, all 30 samples were correctly identified, corresponding to a recall of 100%. For Class 1, 28 of the 30 samples were correctly classified, while two were incorrectly assigned to Class 2, resulting in a recall of 93.33%. Similarly, for Class 2, 29 of the 31 samples were correctly identified, with one sample misclassified as Class 0 and another as Class 1, corresponding to a recall of 93.55%. The corresponding F1-scores were 0.984, 0.949, and 0.935 for Classes 0, 1, and 2, respectively. Most predictions were concentrated along the main diagonal of the confusion matrix, indicating that the proposed method correctly classified the majority of samples across all three classes. The relatively small number of misclassifications was primarily associated with Classes 1 and 2, whereas Class 0 showed no false negatives.
Figure 5.
Pooled out-of-fold confusion matrix for the Top-15 Random Forest model under nested cross-validation (Accuracy: 95.60%).
3.5. Decision-Rule Extraction and Interpretability Analysis
To investigate the interpretability of the proposed framework, IF–THEN decision rules were extracted from the optimized Random Forest model and evaluated according to their classification performance, coverage, and agreement with the original model. Following rule extraction and filtering, 50 rules were retained from a total of 615 generated rules. Among these, 12 representative rules were selected for presentation, with four rules corresponding to each vascular complication category. Rather than selecting rules solely on the basis of predictive performance, the representative subset was chosen to illustrate diverse combinations of clinically relevant and biochemical predictors, particularly GDF-15, FGF-21, adiponectin, high-sensitivity C-reactive protein (hsCRP), and diabetes duration.
As presented in Table 4, the selected rules exhibited covered-sample accuracy values ranging from 0.955 to 1.000, with corresponding weighted F1-scores ranging from 0.932 to 1.000. These findings indicate that the extracted rules reproduced distinct classification patterns within their covered observations, although their performance varied slightly across individual rules. The coverage of the representative rules ranged from 13 to 26 observations, demonstrating that the extracted conditions characterized different subsets of the study population. Importantly, these performance estimates were obtained from the same dataset used to fit the final Random Forest model and therefore should not be interpreted as independent validation results.
Table 4.
Representative decision rules extracted from the optimized Random Forest model.
For patients without vascular complications (Class 0), the extracted rules predominantly involved combinations of relatively low GDF-15 concentrations, FGF-21, adiponectin, oxidized LDL, homocysteine, and shorter diabetes duration. For example, one representative rule combined GDF-15 values between 28.7 and 93.10 with TNF-alpha and diabetes duration of 1–7 years, achieving perfect classification within its 19 covered observations. Another rule combined oxidized LDL and FGF-21, covering 22 observations with an accuracy of 0.955. These patterns suggest that the model identified specific combinations of biochemical and clinical characteristics associated with the absence of established vascular complications.
For patients with microvascular complications (Class 1), GDF-15 appeared in several representative rules, frequently in combination with FGF-21, adiponectin, or diabetes duration. One rule combining GDF-15 and FGF-21 with the encoded comorbidity variable covered 22 observations and achieved an accuracy of 1.000. Another rule involving oxidized LDL, homocysteine, hsCRP, and comorbidity demonstrated that microvascular classification was not exclusively dependent on GDF-15. These findings indicate that the model captured heterogeneous biochemical patterns involving metabolic regulation, inflammatory activity, and vascular-associated biomarkers.
For patients with macrovascular complications (Class 2), the representative rules included combinations of GDF-15, FGF-21, adiponectin, homocysteine, hsCRP, oxidized LDL, and diabetes duration. A rule combining GDF-15, FGF-21, and comorbidity covered 26 observations with an accuracy of 1.000. Other rules incorporated homocysteine with adiponectin, hsCRP with GDF-15 and lipopolysaccharide, or oxidized LDL with diabetes duration. These combinations suggest that macrovascular classification involved multiple interacting clinical and biochemical characteristics rather than a single dominant biomarker.
An important observation is that several predictors appeared across different complication categories but were associated with distinct combinations of feature thresholds. In particular, GDF-15, FGF-21, and adiponectin contributed to representative rules for multiple classes, whereas hsCRP appeared in selected microvascular and macrovascular rules. Diabetes duration also contributed to the differentiation of complication categories. These findings emphasize the potential importance of evaluating biomarker combinations rather than interpreting individual laboratory measurements in isolation.
Nevertheless, the extracted thresholds represent data-driven classification boundaries and should not be considered established clinical reference intervals or diagnostic cutoffs. Furthermore, the selected rules may overlap in their covered observations, and their individual performance does not establish the predictive performance of a complete standalone rule-based classifier. Accordingly, the present analysis provides an interpretable description of the decision patterns learned by the optimized Random Forest model, while further external validation is required to establish their clinical relevance and generalizability.
3.6. Repeated Nested Cross-Validation and Model Stability
To further evaluate the robustness of the proposed framework, an additional repeated nested stratified cross-validation experiment was conducted using 10 repetitions of five outer folds, resulting in 50 outer-fold evaluations. In contrast to the initial feature-count comparison, the number of selected predictors was determined within the inner cross-validation procedure for each outer training partition.
As presented in Table 5, the repeated nested cross-validation experiment achieved a mean Accuracy of 95.71% ± 0.81%, a Weighted F1-score of 95.70% ± 0.81%, and a Macro F1-score of 95.72% ± 0.80%. The Accuracy across repetitions ranged from 94.51% to 96.70%, indicating relatively limited variability in observed predictive performance across different stratified partitions.
Table 5.
Repeated nested cross-validation performance and uncertainty estimates.
Conditional patient-level bootstrap analyses yielded 95% uncertainty intervals of 91.76–98.90% for Accuracy, 91.61–98.90% for Weighted F1-score, and 91.58–98.84% for Macro F1-score. These intervals characterize uncertainty conditional on the available cohort and repeated cross-validation predictions and should not be interpreted as independent external validation estimates.
Feature-count selection varied across the 50 outer-fold evaluations, as summarized in Table 6. The complete 47-feature configuration was selected in 16 folds (32%), followed by the Top-25 configuration in 14 folds (28%) and the Top-15 configuration in 11 folds (22%). The Top-20 and Top-10 configurations were selected in six (12%) and three (6%) folds, respectively, whereas the Top-5 configuration was not selected.
Table 6.
Feature-count selection across 50 outer-fold evaluations.
The feature-selection frequency analysis further revealed that nine predictors were retained in all 50 outer-fold evaluations, including age, FGF-21, lipopolysaccharide, homocysteine, GDF-15, TNF-alpha, urea, comorbidity status, and oxidized LDL. Diabetes duration and hsCRP were selected in 48 folds (96%), while adiponectin was selected in 47 folds (94%). These findings suggest that a core group of predictors was consistently retained despite variation in the selected feature-count configurations.
Overall, the repeated nested cross-validation results provide additional evidence of relatively stable internal predictive performance across different data partitions. However, the variation in selected feature counts indicates that the optimal dimensionality was not uniquely determined by the available dataset. Furthermore, because all repetitions were conducted using the same 91 patients, the results do not establish generalizability to independent clinical populations. The detailed fold-wise Accuracy, Weighted F1-score, and Macro F1-score values obtained from all 50 outer-fold evaluations are provided in Supplementary Table S1 to ensure transparent reporting of classification performance across repeated cross-validation partitions.
3.7. Out-of-Fold Validation of Extracted Decision Rules
To evaluate the generalization performance of the extracted IF–THEN decision rules, an additional out-of-fold rule validation experiment was performed using 10 repetitions of five-fold nested cross-validation, resulting in 50 outer-fold evaluations. Within each outer fold, decision rules were extracted exclusively from the Random Forest model fitted on the corresponding training partition and subsequently evaluated on previously unseen test observations.
As presented in Table 7, across the 50 outer-fold evaluations, the extracted rule sets achieved a mean test coverage of approximately 97.42%, a mean covered-sample accuracy of 88.08%, and a mean fidelity of 89.96% relative to the corresponding Random Forest predictions. The respective standard deviations across outer folds were 7.53, 6.67, and 6.18 percentage points. Complete test coverage was obtained in 41 of the 50 outer folds. Although the extracted rule sets demonstrated relatively high coverage and agreement with the underlying Random Forest models, their predictive accuracy was lower than the in-sample performance reported for the representative rules. This difference highlights the importance of evaluating rule-based explanations on previously unseen observations rather than relying exclusively on training-set performance.
Table 7.
Out-of-fold validation performance of extracted IF–THEN decision rules.
These findings provide additional evidence regarding the internal predictive validity of the extracted rules. Nevertheless, the experiment was conducted using repeated partitions of the same 91-patient cohort and therefore does not constitute independent external clinical validation.
3.8. Probability Calibration and Class-Specific Performance
To complement discrimination-based evaluation, probability calibration and class-specific predictive performance were assessed using the out-of-fold predictions generated by the repeated nested cross-validation procedure. The analysis involved 91 patients distributed across three classes: no vascular complications (n = 30), microvascular complications (n = 30), and macrovascular complications (n = 31). The multiclass Brier score, calculated as the sum of squared probability errors across the three classes, was 0.2123 ± 0.0160. The corresponding class-normalized Brier score was 0.0708 ± 0.0053, with a conditional patient-bootstrap 95% interval of 0.0585–0.0840.
Class-specific binary Brier scores were 0.0445, 0.0762, and 0.0915 for Classes 0, 1, and 2, respectively. The corresponding one-vs-rest ROC-AUC values were 0.9929, 0.9914, and 0.9646. Class-specific F1-scores were 0.9803, 0.9546, and 0.9368, with conditional bootstrap 95% intervals of 0.9412–1.0000, 0.9002–0.9962, and 0.8682–0.9848, respectively. As illustrated in Figure 6, the descriptive one-vs-rest calibration curves revealed departures from the ideal calibration line across several predicted probability ranges, indicating that strong classification performance does not necessarily imply perfectly calibrated probability estimates. In particular, Class 2 exhibited the highest binary Brier score, suggesting comparatively greater probability prediction error for macrovascular complications. These findings provide additional information about model reliability beyond ROC-AUC and classification accuracy. Nevertheless, because the predictions were obtained through repeated internal cross-validation on the same cohort, the calibration and uncertainty estimates should be interpreted as exploratory and require confirmation through independent external validation.
Figure 6.
Descriptive one-vs-rest probability calibration curves for the three vascular complication classes, derived from repeated nested cross-validation out-of-fold predictions. The dashed diagonal line represents perfect calibration, whereas the colored curves indicate the relationship between mean predicted probabilities and observed class frequencies. Class 0: no vascular complications; Class 1: microvascular complications; Class 2: macrovascular complications. The curves are exploratory and do not represent external calibration validation.
4. Discussion
4.1. Classification Performance and Comparative Evaluation
The findings of this study demonstrate the potential of an optimized Random Forest framework for distinguishing between patients without vascular complications, those with microvascular complications, and those with macrovascular complications using clinical and biochemical predictors. The proposed framework achieved a mean classification accuracy of 95.61% ± 2.20%, a weighted F1-score of 95.59% ± 2.21%, and a macro F1-score of 95.62% ± 2.20% under nested cross-validation. The close agreement between accuracy and the two F1-score measures indicates relatively balanced classification performance across the three diagnostic categories, rather than a result driven predominantly by the performance of a single class.
The comparative evaluation further demonstrated that the proposed framework achieved the highest mean accuracy among the investigated algorithms. In particular, XGBoost, the strongest competing model, achieved an accuracy of 93.45% ± 4.04%, corresponding to a difference of 2.16 percentage points in favor of the proposed approach. CatBoost and Extra Trees also demonstrated competitive performance, indicating that ensemble-based learning methods were generally effective in capturing the relationships represented in the dataset. Nevertheless, the observed performance differences should be interpreted cautiously because of the limited sample size and variability associated with cross-validation. The results support the effectiveness of the proposed framework within the evaluated dataset but do not establish statistically significant superiority over the competing algorithms.
The pooled out-of-fold confusion matrix provides additional insight into the classification behavior of the proposed model. All 30 patients without vascular complications were correctly classified, whereas 28 of the 30 microvascular cases and 29 of the 31 macrovascular cases received correct predictions. Two microvascular cases were classified as macrovascular, while one macrovascular case was classified as microvascular and another as having no complications. These findings indicate that most classification errors involved the two complication categories, although an additional error occurred between the macrovascular and no-complication groups. The class-specific ROC-AUC values of 0.995, 0.985, and 0.967 further support the discriminative capability of the framework for Classes 0, 1, and 2, respectively. However, these estimates remain internal validation results and require confirmation in independent patient populations.
4.2. Feature Selection and Model Stability
An important finding of the study is that a reduced subset of clinical and biochemical predictors was sufficient to maintain the classification performance obtained with the complete feature set. Among the evaluated feature counts, the 15-feature configuration achieved a mean accuracy of 95.61%, matching the results obtained with 25 and 47 predictors. This corresponds to a 68.09% reduction in the number of input variables relative to the original 47-feature dataset, without an observed reduction in mean cross-validation accuracy.
This finding suggests that a substantial proportion of the predictive information in the original feature space may be concentrated within a smaller group of variables. Reducing the number of predictors can also simplify the representation of the model and may facilitate subsequent interpretation. However, a reduced feature count does not automatically imply lower clinical measurement costs or greater practical accessibility, since the selected biomarkers may differ considerably in their availability and analytical requirements.
The feature-selection stability analysis provides further information about the consistency of the identified predictors. Twelve variables were selected in all five outer cross-validation folds, whereas IL-6 and adiponectin appeared in three folds and creatinine in two. The repeated selection of a common group of variables suggests that certain predictors retained their relative importance across different training partitions. At the same time, the variation observed for several features indicates that feature rankings remain sensitive to changes in the available observations.
Importantly, feature importance in a Random Forest model reflects the contribution of variables to predictive decisions within the fitted model and should not be interpreted as evidence of a causal relationship with vascular complications. Furthermore, the stability and generalizability of the selected feature subset require evaluation in larger and more heterogeneous cohorts.
The additional repeated nested cross-validation analysis provides further insight into the stability of the complete modeling procedure. Across 10 repetitions and 50 outer-fold evaluations, the framework maintained a mean Accuracy of 95.71% with a repetition-level standard deviation of 0.81 percentage points. This relatively limited variability suggests that the observed classification performance was not strongly dependent on a single stratified data partition. However, feature-count selection varied across outer folds, with the complete 47-feature configuration selected most frequently (32%), followed by the Top-25 (28%) and Top-15 (22%) configurations. These findings indicate that although a reduced feature subset can preserve high predictive performance, the available data do not establish a uniquely optimal number of predictors. Nevertheless, several clinical and biochemical variables, including GDF-15, FGF-21, oxidized LDL, homocysteine, and comorbidity status, were consistently retained across the repeated evaluations. This suggests that the predictive contribution of a core group of variables was relatively stable within the available cohort, although larger independent datasets are required to confirm the reproducibility of these findings.
4.3. Clinical Discrimination and Error Characteristics
The classification results indicate that the proposed framework was particularly effective in identifying patients without vascular complications. The absence of false-negative classifications for Class 0 in the pooled out-of-fold predictions is encouraging within the evaluated sample. Nevertheless, the model incorrectly assigned one macrovascular case to the no-complication category, demonstrating that clinically relevant misclassification remains possible.
The distinction between microvascular and macrovascular complications represents an important component of the proposed three-class classification problem. Although the model achieved recalls of 93.33% and 93.55% for the microvascular and macrovascular groups, respectively, some overlap between these categories was evident in the confusion matrix. Such errors may reflect similarities in the measured clinical and biochemical profiles of individual patients, although the available results do not establish the underlying reasons for these misclassifications.
The high ROC-AUC and average precision values across all three classes indicate favorable ranking performance within the internal validation procedure. However, these discrimination metrics do not directly establish probability calibration, clinical utility, or suitability for treatment decisions. Further investigation would be required to determine whether the model provides clinically meaningful benefits under realistic diagnostic conditions, particularly when the consequences of misclassifying a patient with macrovascular complications are considered.
4.4. Interpretability of the Extracted Decision Rules
Beyond predictive accuracy, an important contribution of the proposed framework is its ability to translate complex relationships among clinical and biochemical variables into explicit, class-specific IF–THEN decision rules. Unlike conventional feature importance analyses, which primarily indicate the relative contributions of individual predictors, the extracted rules describe combinations of biomarker values associated with the classification of vascular complication status. This approach provides an additional level of interpretability by revealing how multiple clinical and biochemical characteristics jointly contribute to the decision boundaries learned by the Random Forest model.
One of the most notable findings was the recurrent involvement of growth differentiation factor 15 (GDF-15) across the representative rules. GDF-15 is a stress-responsive cytokine associated with inflammatory signaling, cellular stress, and cardiometabolic dysfunction. In the present dataset, mean GDF-15 values differed considerably among patients without complications, those with microvascular complications, and those with macrovascular complications, with corresponding values of 68.95, 305.11, and 133.58. The relatively higher mean concentration observed in the microvascular group suggests that GDF-15 may contain discriminatory information relevant to the differentiation of vascular complication categories. Consistent with this observation, several microvascular rules involved GDF-15 values of approximately 167–207, whereas selected rules for patients without complications involved lower GDF-15 intervals. However, GDF-15 also appeared in macrovascular rules, indicating that its classification relevance depended on interactions with other variables rather than on a single concentration threshold. This finding supports the investigation of GDF-15 as part of a multivariable biomarker profile rather than as an isolated diagnostic indicator.
Fibroblast growth factor 21 (FGF-21) also appeared in representative rules for all three classes. FGF-21 is involved in metabolic regulation, including glucose and lipid homeostasis, and has been investigated in relation to insulin resistance and cardiometabolic abnormalities. In the present study, mean FGF-21 values were 14.08, 25.73, and 25.43 in the no-complication, microvascular, and macrovascular groups, respectively. Although the two complication groups exhibited similar mean values, the extracted rules combined FGF-21 with different predictors, including GDF-15, oxidized LDL, and comorbidity status. This observation suggests that the discriminatory contribution of FGF-21 may depend on its biochemical context and interactions with other clinical characteristics. The findings therefore provide exploratory support for investigating FGF-21 within integrated biomarker-based classification models for diabetes-related vascular complications.
Adiponectin represented another biologically relevant variable identified in the extracted decision rules. As an adipokine involved in insulin sensitivity, lipid metabolism, and inflammatory regulation, adiponectin has been investigated in relation to metabolic and vascular disorders. The present rule-based analysis demonstrated that adiponectin contributed to classification patterns across all three vascular complication categories, frequently in combination with GDF-15, homocysteine, or diabetes duration. Importantly, the presence of adiponectin in rules corresponding to different classes suggests that its relationship with vascular complication status may not be adequately characterized by a single directional association. Instead, its contribution may depend on the broader metabolic and inflammatory profile represented by the accompanying predictors. This finding highlights the potential value of examining context-dependent biomarker interactions when investigating diabetes-related vascular complications.
The inclusion of high-sensitivity C-reactive protein (hsCRP) in selected microvascular and macrovascular rules further emphasizes the potential contribution of inflammatory characteristics to vascular complication classification. hsCRP is commonly used as a circulating indicator of systemic inflammation and has been investigated in relation to cardiovascular and metabolic risk. In the present framework, hsCRP appeared alongside oxidized LDL, homocysteine, and comorbidity in a microvascular rule, whereas a macrovascular rule combined hsCRP with GDF-15 and lipopolysaccharide. These combinations suggest that the model captured classification patterns involving multiple inflammatory and metabolic variables. However, the extracted rules do not establish causal relationships between inflammatory activity and vascular complications, and their biological interpretation requires confirmation through additional clinical investigation.
Diabetes duration was also represented in the selected rules and provided an important clinical dimension to the biochemical classification patterns. The descriptive results showed progressively longer mean diabetes duration across the three groups, increasing from 4.50 years in patients without complications to 9.00 years in patients with microvascular complications and 13.92 years in patients with macrovascular complications. This pattern is consistent with the established clinical importance of cumulative diabetes exposure in the development of chronic complications. The extracted rules further demonstrated that diabetes duration contributed in combination with GDF-15, adiponectin, homocysteine, and oxidized LDL. For example, shorter diabetes duration appeared in selected rules for patients without complications, whereas longer duration contributed to a representative macrovascular rule. These findings suggest that combining disease duration with biochemical measurements may provide a more informative representation of vascular complication status than considering duration alone.
Additional predictors, including oxidized LDL, homocysteine, TNF-alpha, and lipopolysaccharide, contributed to several representative rules. These variables reflect different aspects of lipid oxidation, metabolic disturbance, and inflammatory activity. Their combined appearance in class-specific rules illustrates the heterogeneous biochemical patterns captured by the proposed model. Rather than establishing new biological mechanisms, the extracted rules generate testable hypotheses concerning combinations of clinical and biochemical characteristics that may help distinguish vascular complication phenotypes in patients with type 2 diabetes.
From a methodological perspective, the contribution of the present study extends beyond the straightforward combination of existing machine learning and rule-extraction techniques. While previous studies have employed feature selection, ensemble learning, and explainability methods such as SHAP and LIME to investigate diabetes-related complications, their primary objectives have generally involved predicting individual complications, estimating complication-specific risks, or identifying influential predictors. In contrast, the present study examines a distinct three-class classification problem involving patients without vascular complications, those with microvascular complications, and those with macrovascular complications. Within this setting, the framework connects three complementary analytical components: systematic investigation of feature subset sizes, optimized Random Forest classification under nested cross-validation, and extraction of explicit class-specific IF–THEN rules. Importantly, the rule-based analysis goes beyond ranking individual predictors by describing combinations of clinical characteristics and biochemical markers associated with different classification outcomes. For example, GDF-15, FGF-21, adiponectin, hsCRP, and diabetes duration appeared in different combinations across the three complication categories, illustrating how the learned decision boundaries depend on multiple predictors rather than isolated biomarker values. Thus, the principal contribution is the joint examination of predictive performance, feature reduction, and interpretable multivariable decision patterns within a unified three-class vascular complication framework, rather than the introduction of a novel classification or rule-extraction algorithm. Nevertheless, these rule-based patterns remain exploratory because their reported performance was evaluated on the training observations, and their stability and generalizability require independent validation.
The additional out-of-fold validation experiment provided further insight into the reliability and generalizability of the extracted IF–THEN decision rules. Across 50 outer-fold evaluations, the rule sets achieved a mean test coverage of 97.42% ± 7.53%, a covered-sample accuracy of 88.08% ± 6.67%, and a fidelity of 89.96% ± 6.18% relative to the underlying Random Forest predictions. These findings indicate that the extracted rules were able to reproduce a substantial proportion of the model’s classification behavior on previously unseen test observations. However, the lower out-of-fold accuracy compared with the in-sample performance of the representative rules suggests that rule-based explanations are sensitive to changes in training data and may exhibit optimistic performance estimates when evaluated exclusively on the data used for their extraction. Importantly, high rule coverage does not necessarily imply high predictive accuracy, and fidelity measures agreement with the underlying model rather than agreement with the true clinical outcomes. Therefore, although the out-of-fold results strengthen the internal evaluation of the proposed explainability framework, the extracted rules should be interpreted as exploratory decision patterns rather than clinically validated diagnostic criteria.
Nevertheless, the clinical significance of these findings should be interpreted cautiously. The study population comprised only 91 observations, and the extracted rules were evaluated on observations used to construct the final model. Consequently, high covered-sample accuracy and fidelity do not demonstrate that the same rules will generalize to independent patient populations. Moreover, the numerical boundaries identified by the model are dataset-specific and should not be interpreted as clinically validated diagnostic thresholds. The selected rules were also chosen to illustrate representative biomarker combinations rather than to establish the independent importance of each biomarker. Further multicenter studies, external validation, and biomarker interaction analyses are necessary to determine whether these patterns can provide reproducible clinical information.
Overall, the findings suggest that interpretable machine learning may contribute to understanding diabetes-related vascular complication classification by identifying clinically relevant combinations of metabolic, inflammatory, and biochemical characteristics. The principal contribution is not the discovery of new biomarkers, but the demonstration of how established and candidate biomarkers can be integrated into transparent, class-specific decision patterns that may inform future clinical research and hypothesis generation.
4.5. Study Limitations and Future Directions
Several limitations should be considered when interpreting the findings. First, the dataset comprised only 91 observations distributed across three diagnostic categories. Although the class distribution was relatively balanced and nested cross-validation was employed to estimate predictive performance, the limited sample size restricts the precision of performance estimates and increases their sensitivity to individual observations. Nested cross-validation reduces bias associated with hyperparameter tuning when all model-selection operations are appropriately confined to the training folds, but it cannot compensate fully for the limitations of a small clinical dataset. To further assess model stability, repeated nested cross-validation was performed using 10 repetitions of five outer folds. Although this additional analysis demonstrated relatively consistent predictive performance across different data partitions, all repetitions involved the same 91 patients. Consequently, the performance estimates are statistically dependent, and the conditional bootstrap uncertainty intervals do not establish generalizability to independent clinical populations. Furthermore, variation in the selected feature counts across outer folds indicates that model dimensionality remains sensitive to the available training observations.
Second, the study did not include an independent external validation cohort. Consequently, the extent to which the reported performance can be reproduced across different institutions, patient populations, laboratory procedures, or clinical settings remains unknown. The results should therefore be regarded as preliminary evidence of predictive feasibility rather than confirmation of generalizable clinical performance.
Third, the rule-based analysis was conducted on the final model fitted using the available dataset. The reported rule accuracy, weighted F1-score, and fidelity values describe in-sample behavior within the observations covered by each rule. Moreover, individual rules may overlap in their coverage, and their combined performance as an independent rule-based classifier was not established. Future studies should assess rule stability across resampling procedures and evaluate extracted rules on independent observations, including their coverage, fidelity, predictive performance, and consistency.
An additional limitation concerns potential between-group confounding and the interpretation of selected predictors. Differences in age, diabetes duration, and biochemical characteristics, particularly GDF-15, may have influenced the observed classification performance. Although multiple clinical and biochemical predictors were repeatedly retained during feature selection, their selection frequencies do not establish independent predictive contributions or exclude the possibility that a limited number of dominant variables account for much of the observed discrimination. Furthermore, the comparisons presented in Table 1 are descriptive and do not establish statistically significant differences or causal relationships between the clinical groups. The exact temporal relationship between predictor measurements and the initial diagnosis of vascular complications could not be established from the available records. Therefore, the identified feature associations and decision rules should be interpreted as exploratory patterns associated with existing complication status rather than evidence of independent biomarker effects or prospective predictive capability.
Finally, the clinical interpretation of the selected features and decision thresholds requires further investigation. Model-derived associations do not establish causal mechanisms, and the importance of individual biomarkers may be influenced by correlations among predictors and the characteristics of the study population. Future research should therefore prioritize larger multicenter datasets, external validation, calibration assessment, and prospective evaluation. Additional work could also investigate whether a smaller, nonredundant set of clinically interpretable rules can preserve an acceptable balance between predictive performance, coverage, and model fidelity.
Overall, the findings indicate that the combination of optimized Random Forest classification, feature reduction, and decision-rule extraction offers a promising approach for analyzing vascular complication categories. Its principal contribution lies in combining strong internally validated predictive performance with an interpretable representation of selected decision patterns. Further validation is necessary before the framework can be considered suitable for clinical decision support.
5. Conclusions
This study presented an interpretable machine learning framework for classifying vascular complications into three categories: no complications, microvascular complications, and macrovascular complications. The proposed approach integrates Random Forest-based feature selection, Optuna-assisted hyperparameter optimization, nested cross-validation, and IF–THEN decision-rule extraction to achieve a balance between predictive performance, model complexity, and interpretability. The experimental evaluation was conducted on a dataset comprising 91 observations and 47 demographic, clinical, and biochemical predictors.
The experimental findings demonstrated that reducing the number of input features did not necessarily compromise classification performance. Among the evaluated feature subsets, the Top-15 configuration achieved a mean Accuracy of 95.61% ± 2.20%, a Weighted F1-score of 95.59% ± 2.21%, and a Macro F1-score of 95.62% ± 2.20% under five-fold nested cross-validation. These results were identical to those obtained using the Top-25 and complete 47-feature configurations, indicating that a 68.09% reduction in dimensionality could be achieved without sacrificing predictive performance. Furthermore, the proposed framework outperformed nine benchmark machine learning algorithms, including XGBoost, CatBoost, and Extra Trees. Compared with XGBoost, the strongest competing model, the proposed method achieved a 2.16 percentage-point improvement in mean classification accuracy. To further investigate model stability, an additional experiment involving 10 repetitions of five-fold nested cross-validation was conducted, with feature-count selection incorporated into the inner optimization procedure. The framework achieved a mean Accuracy of 95.71% ± 0.81%, a Weighted F1-score of 95.70% ± 0.81%, and a Macro F1-score of 95.72% ± 0.80%. These findings indicate relatively consistent internal predictive performance, although the selected number of features varied across the outer folds.
Class-specific analyses further supported the effectiveness of the proposed approach. The pooled out-of-fold predictions correctly classified 87 of 91 observations, corresponding to an overall accuracy of 95.60%. The model achieved a recall of 100% for patients without vascular complications, while the corresponding recall values for microvascular and macrovascular complications were 93.33% and 93.55%, respectively. In addition, the class-specific ROC-AUC values of 0.995, 0.985, and 0.967 demonstrated strong discriminative performance across the three clinical categories. Beyond predictive accuracy, the extraction and ranking of IF–THEN decision rules provided a means of representing the learned classification patterns through explicit feature conditions, potentially facilitating the interpretation of relationships between clinical and biochemical variables and vascular complication status.
An additional contribution of this study is the identification of interpretable combinations of clinical and biochemical predictors associated with different vascular complication categories in patients with type 2 diabetes. The extracted IF–THEN rules highlighted the involvement of GDF-15, FGF-21, adiponectin, hsCRP, diabetes duration, and other metabolic and inflammatory variables in class-specific classification patterns. Notably, several biomarkers appeared across multiple categories but contributed through different combinations of predictor thresholds, suggesting that their discriminatory relevance may depend on the broader clinical and biochemical context. These findings provide an exploratory basis for investigating multivariable biomarker profiles in diabetes-related vascular complications. However, the extracted associations and thresholds require independent clinical validation before they can be considered diagnostically meaningful.
Nevertheless, several limitations should be considered when interpreting the findings of this study. The relatively small sample size and the absence of independent external validation limit the generalizability of the proposed framework to broader and more heterogeneous patient populations. Furthermore, because the extracted IF–THEN decision rules were evaluated using the same observations employed to train the final model, their reported performance reflects in-sample classification behavior rather than independently validated predictive capability. Accordingly, these rules should be regarded as descriptive representations of the model’s decision-making patterns rather than clinically validated diagnostic criteria. Future research should prioritize evaluating the proposed framework using larger, multicenter datasets, examining the stability, coverage, and predictive performance of extracted rules on independent patient cohorts, and assessing the clinical relevance of the identified biomarkers and decision thresholds. Such investigations are essential to establish the robustness, generalizability, and potential clinical applicability of the proposed approach.
Supplementary Materials
The following supporting information can be downloaded at https://www.mdpi.com/article/10.3390/app162311642/s1: Table S1. Fold-wise classification performance across 10 repetitions of five-fold nested cross-validation, including Accuracy, Weighted F1-score, and Macro F1-score for all 50 outer-fold evaluations.
Author Contributions
Conceptualization, C.B. and M.F.G.; methodology, M.F.G.; software, C.B.; validation, M.F.G. and A.Y.; formal analysis, M.F.G.; investigation, C.B.; resources, A.Y.; data curation, A.Y.; writing—original draft preparation, C.B.; writing—review and editing, E.Ö.; visualization, C.B.; supervision, E.Ö.; project administration, E.Ö.; funding acquisition, E.Ö. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Fırat University Scientific Research Projects Coordination Unit (FÜBAP), under project number TF.26.77. The article processing charge (APC) was also funded by the Fırat University Scientific Research Projects Coordination Unit (FÜBAP), under the same project (TF.26.77).
Institutional Review Board Statement
The study was conducted in accordance with the Declaration of Helsinki and was approved by the Fırat University Non-Interventional Research Ethics Committee (Approval No. 2022/07-34, dated 26 May 2022).
Informed Consent Statement
Written informed consent was obtained from all patients included in the study. All participants were informed about the nature and purpose of the study, and their consent was obtained prior to data collection.
Data Availability Statement
The dataset supporting the findings of this study is provided as Supplementary Material accompanying this article.
Acknowledgments
During the preparation of this manuscript, the authors used ChatGPT (OpenAI, GPT-6) for the purposes of academic language editing, improving textual clarity, and refining the presentation of the manuscript. The authors have reviewed and edited the AI-generated output and take full responsibility for the content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest. The funder, Fırat University Scientific Research Projects Coordination Unit (FÜBAP), had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
Abbreviations
The following abbreviations are used in this manuscript:
| RF | Random Forest |
| ML | Machine Learning |
| XAI | Explainable Artificial Intelligence |
| TPE | Tree-structured Parzen Estimator |
| CV | Cross-Validation |
| ROC | Receiver Operating Characteristic |
| AUC | Area Under the Curve |
| OOF | Out-of-Fold |
| BMI | Body Mass Index |
| HbA1c | Glycated Hemoglobin |
| GDF-15 | Growth Differentiation Factor 15 |
| FGF-21 | Fibroblast Growth Factor 21 |
References
- Forbes, J.M.; Cooper, M.E. Mechanisms of Diabetic Complications. Physiol. Rev. 2013, 93, 137–188. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Brownlee, M. Biochemistry and molecular cell biology of diabetic complications. Nature 2001, 414, 813–820. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cole, J.B.; Florez, J.C. Genetics of diabetes mellitus and diabetes complications. Nat. Rev. Nephrol. 2020, 16, 377–390. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Horton, W.B.; Barrett, E.J. Microvascular Dysfunction in Diabetes Mellitus and Cardiometabolic Disease. Endocr. Rev. 2021, 42, 29–55. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Guyon, I.; Elisseeff, A. An Introduction to Variable and Feature Selection. J. Mach. Learn. Res. 2003, 3, 1157–1182. [Google Scholar] [CrossRef] [Scilit]
- Varma, S.; Simon, R. Bias in error estimation when using cross-validation for model selection. BMC Bioinform. 2006, 7, 91. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rudin, C. Stop explaining black box machine learning models for high stakes decisions and use interpretable models instead. Nat. Mach. Intell. 2019, 1, 206–215. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schallmoser, S.; Zueger, T.; Kraus, M.; Saar-Tsechansky, M.; Stettler, C.; Feuerriegel, S. Machine Learning for Predicting Micro- and Macrovascular Complications in Individuals with Prediabetes or Diabetes: Retrospective Cohort Study. J. Med. Internet Res. 2023, 25, e42181. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nicolucci, A.; Romeo, L.; Bernardini, M.; Vespasiani, M.; Rossi, M.C.; Petrelli, M.; Ceriello, A.; Di Bartolo, P.; Frontoni, E.; Vespasiani, G. Prediction of complications of type 2 Diabetes: A Machine learning approach. Diabetes Res. Clin. Pract. 2022, 190, 110013. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Liu, L.; Bi, B.; Cao, L.; Gui, M.; Ju, F. Predictive model and risk analysis for peripheral vascular disease in type 2 diabetes mellitus patients using machine learning and shapley additive explanation. Front. Endocrinol. 2024, 15, 1320335. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yin, J.-M.; Li, Y.; Xue, J.-T.; Zong, G.-W.; Fang, Z.-Z.; Zou, L. Explainable Machine Learning-Based Prediction Model for Diabetic Nephropathy. J. Diabetes Res. 2024, 2024, 8857453. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Shiren, Y.; Jiangnan, Y.; Xinhua, Y.; Xinye, N. Interpretable prediction model for assessing diabetes complication risks in Chinese sufferers. Diabetes Res. Clin. Pract. 2024, 209, 111560. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rashid, M.; Alkhodari, M.; Mukit, A.; Ahmed, K.I.U.; Mostafa, R.; Parveen, S.; Khandoker, A.H. Machine Learning for Screening Microvascular Complications in Type 2 Diabetic Patients Using Demographic, Clinical, and Laboratory Profiles. J. Clin. Med. 2022, 11, 903. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wen, Y.; Wan, Z.; Ren, H.; Wang, X.; Wang, W. Interpretable Machine Learning Model for Predicting and Assessing the Risk of Diabetic Nephropathy: Prediction Model Study. JMIR Med. Inform. 2025, 13, e64979. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, N.; Wang, Y.; Zhang, H.; Fang, H.; Li, X.; Li, Z.; Huan, Z.; Zhang, Z.; Wang, Y.; Li, W.; et al. Application of interpretable machine learning algorithms to predict macroangiopathy risk in Chinese patients with type 2 diabetes mellitus. Sci. Rep. 2025, 15, 16393. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zamani, M.; Farhadian, M.; Piran, N.; Borzouei, S. A Stacked Ensemble Multi-Label Model for Predicting Co-Occurring Microvascular and Macrovascular Complications in Type 2 Diabetes. Chronic Dis. Transl. Med. 2026, 12, 151–160. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, Y.; Feng, S.; Xue, Y.; Xue, L.; Luo, J. Development and validation of an explainable machine learning model for differentiating diabetic nephropathy from diabetic retinopathy in patients with type 2 diabetes. Front. Endocrinol. 2026, 17, 1902508. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wang, S.; Wang, Y.; Wang, D.; Yin, Y.; Wang, Y.; Jin, Y. An improved random forest-based rule extraction method for breast cancer diagnosis. Appl. Soft Comput. J. 2020, 86, 105941. [Google Scholar] [CrossRef] [Scilit]
- Kanbour, S.; Harris, C.; Lalani, B.; Wolf, R.M.; Fitipaldi, H.; Gomez, M.F.; Mathioudakis, N. Machine Learning Models for Prediction of Diabetic Microvascular Complications. J. Diabetes Sci. Technol. 2024, 18, 273–286. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ghafoor, B.; Zaccardi, F.; Khunti, K.; Shabnam, S. Comparative predictive accuracy of machine learning versus traditional statistical methods for diabetes-related complications: A systematic review and analysis. Diabet. Med. 2026, e70398. [Google Scholar] [CrossRef] [Scilit] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.





