Comparative Analysis of CNN and SVM Algorithms for Pneumonia Classification from Chest X-Ray Images
Abstract
Pneumonia significantly threatens human health, especially in children and the elderly. Diagnosing pneumonia using chest radiographs is time consuming and requires expert interpretation. This study proposes a comparative analysis of two algorithm models, namely Support Vector Machine (SVM) and Convolutional Neural Network (CNN), in CNN algorithm, it specifically uses DenseNet121 and InterceptionV3 architectures for the classification of chest X-ray images in pneumonia and normal categories. The methods used include data preprocessing with normalization and augmentation. The dataset is split into training and testing subsets, and implementation of SVM and CNN algorithms for classification. Kaggle provided the dataset for this study, comprising 5,863 chest X-ray images. Metrics such as accuracy, precision, recall, and F1-score calculated from the confusion matrix were used to evaluate the model’s effectiveness. The test findings show that the DenseNet121 model has the best performance among the three models, with an accuracy, recall, and F1-score of 94%. The InceptionV3 model achieved 89% in accuracy, recall, and F1-score, which is higher than DenseNet121. Meanwhile, the SVM model showed the lowest performance with an accuracy of 81%, precision of 85%, recall of 81%, and F1-score of 79%. These outcomes signifies that Convolutional Neural Network (CNN) architectures, particularly DenseNet121, have superior capabilities in extracting complex features from chest X-ray images and show great potential to be applied in automatic and accurate pneumonia detection systems.
Downloads
References
N. P. Ekananda and D. Riminarsih, “Identifikasi Penyakit Pneumonia Berdasarkan Citra Chest X-ray Menunggunakan Convolutional Neural Network” Jurnal Ilmiah Informatika Komputer, vol. 27, no. 1, pp. 79–94, 2022, doi: 10.35760/ik.2022.v27i1.6487.
I. Md. D. Maysanjaya, “Klasifikasi Pneumonia pada Citra X-rays Paru-paru dengan Convolutional Neural Network,” Jurnal Nasional Teknik Elektro dan Teknologi Informasi, vol. 9, no. 2, pp. 190–195, May 2020, doi: 10.22146/jnteti.v9i2.66.
World Health Organization, “Pneumonia in children.” [Online]. Available : https://www.who.int/news-room/fact-sheets/detail/pneumonia
M. M. Eid and Y. H. Elawady, “Efficient Pneumonia Detection for Chest Radiography Using ResNet-Based SVM,” European Journal of Electrical Engineering and Computer Science, vol. 5, no. 1, pp. 1–8, Jan. 2021, doi: 10.24018/ejece.2021.5.1.268.
B. Nugroho and E. Yulia, “Kinerja Metode CNN untuk Klasifikasi Pneumonia dengan Variasi Ukuran Citra Input,” Jurnal Teknologi Informasi dan Ilmu Komputer (JTIIK), vol. 8, no. 3, pp. 533–538, 2021, doi: 10.25126/jtiik.202184515.
E. Putra and A. Meindiawan, “Application of MobileNetV2 and SVM Combination for Enhanced Accuracy in Pneumonia Classification,” Journal of Applied Informatics and Computing (JAIC), Vol.8, No.2, pp. 332~340, December 2024, doi: 10.30871/jaic.v8i2.8426. [Online]. Available: http://jurnal.polibatam.ac.id/index.php/JAIC
M. J. Sulistio, C. Lubis, and K. Kunci, “Implementasi CNN dan MobileNet untuk Mendeteksi Penyakit Pneumonia dan COVID-19 dengan Menggunakan Aplikasi Smartphone,” Nusantara Journal of Multidisciplinary Science, vol. 1, no. 4, 2023, [Online]. Available: https://jurnal.intekom.id/index.php/njms
A. W. Salehi et al., “A Study of CNN and Transfer Learning in Medical Imaging: Advantages, Challenges, Future Scope,” Sustainability, vol. 15, no. 7, p. 5930, Mar. 2023, doi: 10.3390/su15075930.
I. A. Firdaus, “Deteksi Infeksi Mycoplasma Pneumoniae Pneumonia Menggunakan Komparasi Algoritma Klasifikasi Machine Learning,” JOINTECS (Journal of Information Technology and Computer Science), vol. 7, no. 1, p. 35, Feb. 2022, doi: 10.31328/jointecs.v7i1.3242.
I. Jawaz and Reni Rahmadewi, “Sistem Deteksi Pneumonia Paru-Paru dengan Pengolahan Citra Digital dan Machine Learning,” ELECTRON Jurnal Ilmiah Teknik Elektro, vol. 5, no. 1, May 2024, doi: 10.33019/electron.v5i1.114.
O. Ozaltin and O. Yeniay, “ECG Classification Performing Feature Extraction Automatically Using a Hybrid CNN-SVM Algorithm,” in 2021 3rd International Congress on Human-Computer Interaction, Optimization and Robotic Applications (HORA), IEEE, Jun. 2021, pp. 1–5. doi: 10.1109/HORA52670.2021.9461295.
O. J. Egwom, M. Hassan, J. J. Tanimu, M. Hamada, and O. M. Ogar, “An LDA–SVM Machine Learning Model for Breast Cancer Classification †,” BioMedInformatics, vol. 2, no. 3, pp. 345–358, Sep. 2022, doi: 10.3390/biomedinformatics2030022.
R. A. Wati, H. Irsyad, and M. E. Al Rivan, “Classification of Pneumonia Using Support Vector Machine,” Jurnal Algoritme, vol. 1, no. 1, pp. 21–32, Oct. 2020, doi: 10.35957/algoritme.v1i1.429.
N. Amaya-Tejera, M. Gamarra, J. I. Vélez, and E. Zurek, “A distance-based kernel for classification via Support Vector Machines,” Front Artif Intell, vol. 7, 2024, doi: 10.3389/frai.2024.1287875.
A. R. Pratama and A. F. Cobantoro, “Klasifikasi Citra Pneumonia Menggunakan Arsitektur Convolutional Neural Network (CNN),” Networking Engineering Research Operation, vol. 8, no. 2, pp. 133–144, Dec. 2023, doi: 10.21107/nero.v8i2.18992.
I. Bakti and M. Firdaus, “Arsitektur CNN InceptionResNet-V2 Untuk Pengelompokan Pneumonia Chest X-Ray,” Jurnal Komputer dan Teknologi, pp. 35–42, Jan. 2023, doi: 10.58290/jukomtek.v1i2.66.
S. A. Widiarto, W. A. Saputra, and A. R. Dewi, “Klasifikasi Citra X-ray Toraks Dengan Menggunakan Contrast Limited Adaptive Histogram Equalization dan Convolutional Neural Network (Studi Kasus: Pneumonia),” JIPI (Jurnal Ilmiah Penelitian dan Pembelajaran Informatika), vol. 6, no. 2, pp. 348–359, Nov. 2021, doi: 10.29100/jipi.v6i2.2102.
I. Bakti, “Klasifikasi Pneumonia Chest X-Ray Dengan Arsitektur Inceptionresnet-V2,” Jurnal Teknologi Informasi (JUTECH), vol. 3, no. 2, pp. 107–121, Dec. 2022, doi: 10.32546/jutech.v3i2.2030.
R. Kaur, R. Kumar, and M. Gupta, “Review on Transfer Learning for Convolutional Neural Network,” in 2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICAC3N), IEEE, Dec. 2021, pp. 922–926. doi: 10.1109/ICAC3N53548.2021.9725474.
M. Ahmed, N. Afreen, M. Ahmed, M. Sameer, and J. Ahamed, “An inception V3 approach for malware classification using machine learning and transfer learning,” International Journal of Intelligent Networks, vol. 4, pp. 11–18, 2023, doi: 10.1016/j.ijin.2022.11.005.
A. Fauziah, H. Hermanto, and M. A. Sukmarini, “Extreme Gradient Boosting pada Peramalan Pola Curah Hujan Bulanan Kabupaten Banyuwangi,” Jurnal Kridatama Sains dan Teknologi, vol. 6, no. 02, pp. 430–440, Jul. 2024, doi: 10.53863/kst.v6i02.1154.
W. Wijiyanto, A. I. Pradana, S. Sopingi, and V. Atina, “Teknik K-Fold Cross Validation untuk Mengevaluasi Kinerja Mahasiswa,” Jurnal Algoritma, vol. 21, no. 1, May 2024, doi: 10.33364/algoritma/v.21-1.1618.
M. I. Anugrah, J. Zeniarja, and D. S. Setiawan, “Peningkatan Performa Model Hard Voting Classifier dengan Teknik Oversampling ADASYN pada Penyakit Diabetes,” Edumatic: Jurnal Pendidikan Informatika, vol. 8, no. 1, pp. 290–299, Jun. 2024, doi: 10.29408/edumatic.v8i1.25838.
R. S. Y. P. Errissya Rasywir1, “Analisis dan Implementasi Diagnosis Penyakit Sawit dengan Metode Convolutional Neural Network (CNN) ,” Paradigma - Jurnal Komputer dan Informatika, vol. 21, no. 2, Sep. 2020, doi:10.31294/p.v21i2.
D. Marcella and S. Devella, “Klasifikasi Penyakit Mata Menggunakan Convolutional Neural Network Dengan Arsitektur VGG-19,” Jurnal Algoritme, vol. 3, no. 1, pp. 60–70, 2022, doi:10.35957/algoritme.v3i1.3331.
W. Ayadi, W. Elhamzi, I. Charfi, and M. Atri, “Deep CNN for Brain Tumor Classification,” Neural Process Lett, vol. 53, no. 1, pp. 671–700, Feb. 2021, doi: 10.1007/s11063-020-10398-2.
Bila bermanfaat silahkan share artikel ini
Berikan Komentar Anda terhadap artikel Comparative Analysis of CNN and SVM Algorithms for Pneumonia Classification from Chest X-Ray Images
Pages: 832-840
Copyright (c) 2025 Ar Ainun Bela, Kemas M Lhaksmana

This work is licensed under a Creative Commons Attribution 4.0 International License.
Authors who publish with this journal agree to the following terms:
- Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under Creative Commons Attribution 4.0 International License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this journal.
- Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial publication in this journal.
- Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (Refer to The Effect of Open Access).





















