This study aimed to investigate the performance of different feature selection methods and classifiers on a CXR radiography dataset containing normal and abnormal classes. The X-ray dataset was managed, and features were extracted using the pretrained deep learning models, DenseNet-201 and ResNet-50. Five statistical feature selection techniques were then applied to the extracted features. These five feature selection techniques are ANOVA, chi-square test, MRMR, ReliefF, and Kruskal-Wallis, used to determine the most informative features for distinguishing between the normal and abnormal X-ray images.
After feature selection, the most appropriate features were utilized to train and assess the performance of five classifiers: Linear support vector machine (LSVM), quadratic support vector machine (QSVM), cubic support vector machine (CSVM), medium Gaussian support vector machine (MGSVM), and ensemble subspace discriminant (ESD) model. The dataset was then divided into training, validation, and test sets with a 70:10:20 ratio to ensure robust model assessment. The classifiers were trained on the training set, and hyperparameter tuning was conducted using the validation set. The final performance assessment was conducted on the test set, focusing on metrics of the classifiers, such as accuracy, sensitivity rate, specificity rate, misclassification rate, F1 score, precision rate, and area under the receiver operating characteristic curve (AUC-ROC), individually.
The test outcomes were carefully examined to identify the best feature selection strategies and classifier combinations for detecting CXR abnormalities. The results demonstrate how various methods of machine learning may assist radiologists with diagnostic duties, as long as important new information regarding the use of machine learning in medical image analysis is gained. To ensure viable reproduction, the experiments were conducted with MATLAB2020a on a PC equipped with an Intel i7 CPU, 32 GB RAM, and an NVIDIA GeForce GTX 750 TI graphics card. Furthermore, the Matconvnet deep learning toolbox was used to perform deep feature extraction, which enhanced the system’s ability to recognize subtle patterns and attributes within the CXR data.
To determine the functional level of machine learning models in solving certain problems, their performance needs to be measured. We use certain predominantly utilized machine learning parameter metrics to assess our CXR classification system’s performance in a broad sense. These measures, along with the model’s accuracy in classifying cases of chest anomalies, provide insightful information about numerous facets of the model’s performance. Here, we discuss the parameter metrics that were used to compute performance: The AUC-ROC, F1 score, sensitivity rate, precision rate, specificity rate, and misclassification rate.
Sensitivity, also known as recall or true positive rate, assesses how well the model correctly identifies positive instances among all actual positive instances, calculated using Equation (17). Specificity, also known as the true negative rate, evaluates how well the model correctly recognizes negative instances among all actual negative instances. It is calculated using Equation (18). The misclassification rate, also identified as the error rate, measures the proportion of all instances (both positive and negative) that are incorrectly classified by the model. It is calculated using Equation (19). Precision, often denoted as a positive predictive value, estimates the proportion of accurate positive predictions out of all positive predictions made by the model, as calculated using Equation (21). The F1 score, a combination of precision and recall, provides a balanced measure of the model’s overall performance, accounting for both false positives and false negatives. It is calculated using Equation (22). The AUC-ROC measures the model’s ability to distinguish between positive and negative classes across various threshold settings. A higher AUC value signifies better discrimination capability, with 1 indicating perfect classification.
Equation 17.
Equation 18.
Equation 19.
Or simply by the equation:
Equation 20.
Equation 21.
Equation 22.
This study investigated the performance of different feature selection methods and classifiers on a CXR radiography dataset. Performance evaluation was conducted on the test set, focusing on metrics such as accuracy, sensitivity rate, specificity rate, misclassification rate, F1 score, precision rate, and AUC-ROC of the classifiers. The outcomes were carefully analyzed to identify the best feature selection strategies and classifier combinations for determining abnormalities in CXRs.
Table 1 shows various machine learning classifiers, including LSVM, QSVM, CSVM, MGSVM, and ESD models, which were used to classify abnormalities in CXRs. LSVM achieved the highest accuracy of 90.7% and 91.1% on ResNet-50 and DenseNet-201, respectively.
| Variables; Classifier | Sensitivity rate (%) | Precision rate (%) | Specificity rate (%) | F1 score (%) | AUC | Misclassification rate (%) | Accuracy (%) | Time (s) |
|---|
| M-ResNet50-IACO (M-R50-IACO) | | | | | | | | |
| LSVM | 91.64 | 89.73 | 89.97 | 90.67 | 0.96 | 9.291 | 90.7 | 30.599 |
| QSVM | 92.33 | 88.11 | 87.98 | 90.17 | 0.95 | 9.61 | 90.4 | 32.112 |
| CSVM | 91.71 | 88.81 | 89.16 | 90.24 | 0.95 | 9.601 | 90.4 | 36.864 |
| MGSVM | 91.65 | 88.11 | 88.55 | 89.85 | 0.95 | 9.960 | 90.0 | 38.216 |
| ESD | 90.59 | 87.95 | 88.29 | 89.25 | 0.93 | 10.59 | 89.4 | 192.68 |
| M-DenseNet201-IACO (M-D201-IACO) | | | | | | | | |
| LSVM | 92.65 | 89.29 | 89.67 | 90.89 | 0.96 | 8.893 | 91.1 | 107.09 |
| QSVM | 92.64 | 89.13 | 89.53 | 90.85 | 0.95 | 8.980 | 91.0 | 22.671 |
| CSVM | 92.19 | 89.21 | 89.55 | 90.78 | 0.95 | 9.171 | 90.8 | 24.536 |
| MGSVM | 92.42 | 88.35 | 88.83 | 91.35 | 0.95 | 9.455 | 90.6 | 25.401 |
| ESD | 93.05 | 88.58 | 89.11 | 90.76 | 0.95 | 9.015 | 91.0 | 20.489 |
Abbreviations: AUC, area under the curve; IACO, improved ant colony optimization; M-ResNet50, modified ResNet-50; LSVM, linear support vector machine; QSVM, quadratic support vector machine; CSVM, cubic support vector machine; MGSVM, medium Gaussian support vector machine; ESD, ensemble subspace discriminant; M-DenseNet201, modified DenseNet-201.
Figure 5 presents the confusion matrix corresponding to the highest accuracy achieved, providing further insight into the model’s performance. The confusion matrix offers a detailed breakdown of the classifier’s predictions compared with the actual classes, thereby enabling a comprehensive assessment of the classifier’s classification accuracy.
Figure 6 presents a graph comparing the AUC values that illustrate the performance of the five classifiers applied to features derived from the ResNet-50 and DenseNet-201 deep learning models.
Confusion matrix of linear SVM proposed for chest X-ray (CXR) classification for A, ResNet-50, and B, DenseNet-201
Comparison of the area under the receiver operating characteristic curve (AUC-ROC) values of five classifiers for A, ResNet-50, and B, DenseNet-201
Table 2 shows that the fusion of both models and the ESD model achieved the highest accuracy of 95.9%, with a sensitivity of 97.70%, precision rate of 93.94%, specificity of 94.16%, F1 score of 95.78%, AUC-ROC of 0.99, and a misclassification rate of 4.13%, which was the lowest among all classifiers.
Figure 7 illustrates the confusion matrix that provides a detailed breakdown of the classifier’s predictions compared with the actual classes, thereby enabling a comprehensive assessment of the classifier’s classification accuracy.
| Classifier | Sensitivity rate (%) | Precision rate (%) | Specificity rate (%) | F1 score (%) | AUC | Misclassification rate (%) | Accuracy (%) | Time (s) |
|---|
| LSVM | 95.76 | 93.39 | 93.54 | 94.56 | 0.99 | 5.43 | 94.6 | 31.825 |
| QSVM | 95.53 | 94.22 | 94.29 | 94.87 | 0.99 | 5.01 | 95.0 | 35.337 |
| CSVM | 96.03 | 93.39 | 93.57 | 94.69 | 0.99 | 4.79 | 95.3 | 24.291 |
| MGSVM | 94.72 | 93.94 | 93.99 | 94.33 | 0.98 | 5.60 | 94.4 | 26.924 |
| ESD | 97.70 | 93.94 | 94.16 | 95.78 | 0.99 | 4.13 | 95.9 | 16.511 |
Abbreviations: AUC, area under the curve; LSVM, linear support vector machine; QSVM, quadratic support vector machine; CSVM, cubic support vector machine; MGSVM, medium Gaussian support vector machine; ESD, ensemble subspace discriminant.
Confusion matrix of ensemble subspace discriminant (ESD) using hybrid-based classification
Table 3 shows the top 10 features using the above five methods, and these are after the fusion of two deep learning pretrained models, ResNet-50 and DenseNet-201, which were modified. The Kruskal-Wallis test, a nonparametric approach, assesses differences in feature distributions across classes, producing an H-statistic to identify feature relevance. ReliefF assesses features iteratively according to their capacity to differentiate between nearby instances of differing classes, assigning weights to features where higher weights indicate greater importance. The ANOVA examines variances between classes and identifies features that significantly contribute to class differentiation, calculating an F-statistic for each feature, with higher values indicating greater importance. The chi-square test evaluates the independence between features and the target variable, with higher chi-square values representing a stronger association with class labels and, thus, higher importance. The MRMR selects features that are highly relevant to the target variable while minimizing redundancy among features. This is achieved by balancing relevance and redundancy, maximizing mutual information with the target, and minimizing mutual information among selected features. We presented the top 10 features determined using the five feature selection methods, all of which were applied after the fusion of both models.
Figure 8 illustrates the bar chart representations of the five methods.
| Features | Kruskal-Wallis | Features | ReliefF | Features | ANOVA | Features | Chi-square | Features | MRMR |
|---|
| Fused11900 | 165.2481 | Fused177 | 0.0864 | Fused12219 | 201.1342 | Fused11900 | 150.9365 | Fused12219 | 0.2498 |
| Fused12219 | 160.3268 | Fused11203 | 0.0849 | Fused177 | 184.9144 | Fused12219 | 144.0698 | Fused11504 | 0.0610 |
| Fused11203 | 150.9511 | Fused11653 | 0.0794 | Fused12864 | 180.2693 | Fused177 | 137.9733 | Fused198 | 0.0472 |
| Fused177 | 149.7770 | Fused1592 | 0.0773 | Fused11478 | 173.3106 | Fused11478 | 137.7815 | Fused11535 | 0.0410 |
| Fused11478 | 148.3421 | Fused166 | 0.0766 | Fused11203 | 166.3991 | Fused12864 | 136.4281 | Fused1109 | 0.0400 |
| Fused12864 | 147.6531 | Fused11411 | 0.0745 | Fused11653 | 163.1985 | Fused11203 | 133.8647 | Fused12409 | 0.0376 |
| Fused11653 | 138.9938 | Fused11478 | 0.0739 | Fused12701 | 162.3664 | Fused11653 | 131.8460 | Fused13813 | 0.0343 |
| Fused12701 | 138.0561 | Fused12081 | 0.0717 | Fused13097 | 157.8783 | Fused12701 | 125.0469 | Fused12482 | 0.0308 |
| Fused13097 | 135.4667 | Fused1943 | 0.0710 | Fused12520 | 153.3335 | Fused1943 | 123.2746 | Fused1229 | 0.0292 |
| Fused11189 | 133.5194 | Fused12520 | 0.0703 | Fused12081 | 152.3343 | Fused11189 | 121.2380 | Fused13479 | 0.0276 |
Abbreviations: ANOVA, analysis of variance; MRMR, minimum redundancy maximum relevance.
Bar chart representation of five methods
Figure 9A presents a graph comparing AUC values that illustrate the performance of the five classifiers applied to features derived from the fusion of the two models. These results underscore the proficiency of the fusion in extracting valuable features that improve the effectiveness of various machine learning classifiers.
Figure 9B presents a graph that compares AUC-ROC values, illustrating the performance of the three best classifiers applied to features derived from ResNet-50, DenseNet-201, and the combination of both models. The LSVM classifiers from ResNet-50 and DenseNet-201 demonstrated strong performance, each with an AUC value of 0.96. Meanwhile, from the fusion of both models, ESD achieved the highest AUC-ROC value of 0.99.
Figure 9C presents the ROC curve of eight lesions on the CXR dataset: Cardiomegaly, effusion, infiltrate, mass, nodule, atelectasis, pneumonia, and pneumothorax.
A, Area under the receiver operating characteristic curve (AUC-ROC) values of five classifiers on hybrid-based classification; B, Area under the curve (AUC) graph of modified ResNet-50 (M-ResNet50), DenseNet-201, and hybrid-based classification; C, AUC graph of the eight abnormal lesions.
To comprehensively investigate the performance of our classifiers, we computed several key metrics across various experiments. To summarize the performance attributes, we identified the mean and SD of these metrics for different classifiers.
Table 4 presents the mean ± SD values of each metric across all the evaluated classifiers in this study. The 95% confidence intervals (CI) indicate the statistical range in which the true metric value is expected to lie, based on 10-fold cross-validation results, providing a more robust understanding of model performance than a single average value. The relatively small SD across cross-validation folds (e.g., F1 score = 94.85 ± 0.56) further indicates stable and robust performance, reducing the likelihood of overfitting. Additionally, training and validation losses were monitored during model optimization. Both curves showed smooth convergence without divergence, suggesting proper generalization.
| Algorithms | Sensitivity rate (%) | Precision rate (%) | Specificity rate (%) | F1 score (%) | Computational time (s) |
|---|
| M-ResNet50 | 92.59 ± 0.32 | 89.91 ± 0.42 | 89.39 ± 0.35 | 90.93 ± 0.24 | 66.09 ± 70.83 |
| M-DenseNet201 | 91.58 ± 0.63 | 88.54 ± 0.74 | 88.79 ± 0.79 | 90.04 ± 0.53 | 40.04 ± 37.53 |
| Hybrid MR50 + MD201 | 95.95 ± 1.09 | 93.91 ± 0.37 | 93.91 ± 0.34 | 94.85± 0.56 | 26.98 ± 7.25 |
| [95.27, 96.63] | [93.68, 94.14] | [93.70, 94.12] | [94.50, 95.20] | [22.49, 31.47] |
Abbreviations: M-ResNet50, modified ResNet-50; M-DenseNet201, modified DenseNet-201.
a Values are expressed as mean ± standard deviation (SD) or 95% confidence intervals.
Table 5 represents the individual comparison of the computational speed across all the classifiers with the relevant models. Computational speed plays a crucial role in deep learning-based medical image analysis. The table emphasizes the computational times of the different models, demonstrating their efficiency in handling image classification. Some models exhibit higher accuracy but require longer processing times. Our proposed hybrid method balances computational efficiency and classification performance, ensuring optimal results.
| Classifiers | Computational Speed (s) |
|---|
| M-ResNet50 | M-DenseNet201 | Hybrid proposed model |
|---|
| LSVM | 30.599 | 107.09 | 31.825 |
| QSVM | 32.112 | 22.671 | 35.337 |
| CSVM | 36.864 | 24.536 | 24.291 |
| MGSVM | 38.216 | 25.401 | 26.924 |
| ESD | 192.68 | 20.489 | 16.511 |
Abbreviations: M-ResNet50, modified ResNet-50; M-DenseNet201, modified DenseNet-201; LSVM, linear support vector machine; QSVM, quadratic support vector machine; CSVM, cubic support vector machine; MGSVM, medium Gaussian support vector machine; ESD, ensemble subspace discriminant.
Table 6 shows a comparison of some previous and recent state-of-the-art models and their performance metrics. Wang et al. utilized a CXR image dataset to classify the images and achieved 93.40% accuracy, 93.30% sensitivity, and 95.76% specificity. Furthermore, Wang et al. (
22) modified an inception TL model to establish an AI algorithm and used a binary dataset, achieving 89.50% accuracy. Subsequently, Song et al. (
23) obtained 93.0% accuracy. Perumal et al. (
24) proposed a deep learning model named Inception Nasnet that achieved 94.3% accuracy. Furthermore, another study applied a deep learning-based image analysis called cardio-XAttentionNet, performing binary classification and achieving 85% accuracy. Moreover, Benmalek et al. (
25) used CXR images from ResNet-18, InceptionV3, and MobileNetV2 for the experimental process and achieved 87.70% accuracy. In our work, we proposed a hybrid-based approach consisting of the fusion of features from the modified DL model that achieved a state-of-the-art accuracy of 95.9%.
| Reference | Accuracy | Sensitivity rate | Specificity rate | Precision rate | F1 score |
|---|
| Wang et al. (11) | 89.50 | 87.0 | 88.0 | - | - |
| Benmalek et al. (25) | 87.70 | 92.30 | 88.80 | 93.40 | - |
| Song et al. (23) | 93.0 | 93.0 | 88.80 | 93.40 | - |
| Wang et al. (22) | 93.40 | 93.30 | 95.76 | - | - |
| Perumal et al. (24) | 94.3 | 94.0 | - | 94.0 | - |
| Innat et al. (9) | 85.0 | 85.0 | - | 87 | 86.0 |
| Our proposed hybrid approach | 95.9 | 97.70 | 94.16 | 93.94 | 95.78 |
a Values are expressed as percentage.
Table 7 compares eight lesions (cardiomegaly, effusion, infiltrate, mass, nodule, atelectasis, pneumonia, and pneumothorax) from previous state-of-the-art models. We achieved better AUC values than the previous results (
26-
31). The most recent results were those of Kufel et al. (
32), who achieved an AUC of 0.817 for atelectasis, whereas we achieved 0.881. For cardiomegaly lesions, Kufel et al. (
32) achieved an AUC of 0.911, whereas we achieved 0.947. Considering all results, we have average AUC scores, and a recent study achieved an AUC of 0.843, whereas we achieved 0.889.
| Pathology Label | Yao et al. (26) | Wang et al. (27) | Shen and Gao (28) | Guendel et al. (29) | Yan et al. (30) | Baltruschat et al. (31) | Kufel et al. (32) | Ours |
|---|
| Atelectasis | 0.733 | 0.700 | 0.766 | 0.767 | 0.792 | 0.763 | 0.817 | 0.831 |
| Cardiomegaly | 0.856 | 0.810 | 0.801 | 0.883 | 0.881 | 0.875 | 0.911 | 0.947 |
| Effusion | 0.806 | 0.759 | 0.797 | 0.828 | 0.842 | 0.822 | 0.879 | 0.880 |
| Infiltration | 0.673 | 0.661 | 0.751 | 0.709 | 0.710 | 0.694 | 0.716 | 0.863 |
| Mass | 0.777 | 0693 | 0.760 | 0.821 | 0.847 | 0.820 | 0.853 | 0.843 |
| Nodule | 0.724 | 0.669 | 0.741 | 0.758 | 0.811 | 0.747 | 0.771 | 0.810 |
| Pneumonia | 0.684 | 0.658 | 0.778 | 0.731 | 0.740 | 0.714 | 0.769 | 0.885 |
| Pneumothorax | 0.805 | 0.799 | 0.800 | 0.846 | 0.876 | 0.840 | 0.898 | 0.919 |
| Average | 0.7614 | 0.745 | 0.775 | 0.807 | 0.830 | 0.727 | 0.843 | 0.872 |
Figure 10 presents the confusion matrix for the eight lesions, showing the misclassification rates for each class separately. Overall, the model demonstrated high precision across most classes, with particularly strong performance for cardiomegaly (85.86%), pneumothorax (93.43%), and mass (90.4%). However, certain confusions were observed: Infiltrate was occasionally misclassified as cardiomegaly (12.12%) and pneumonia (2.02%), and effusion showed noticeable confusion with infiltrate (10.10%) and pneumothorax (6.57%), whereas nodule and atelectasis had minor misclassifications across multiple classes.
Confusion matrix of the eight abnormal lesions