Comparison of CNN Classification Model using Machine Learning with Bayesian Optimizer

Sugiyarto Surono, M. Yahya Firza Afitian, Anggi Setyawan, Dyiyah Kresna Eni Arofah, Aris Thobirin


One of the best-known and frequently used areas of Deep Learning in image processing is the Convolutional Neural Network (CNN), which has architectural designs such as Inceptionv3, DenseNet201, Resnet50, and MobileNet used in image classification and pattern recognition. Furthermore, the CNN extracts feature from the image according to the designed architecture and performs classification through the fully connected layer, which executes the Machine Learning (ML) algorithm tasks. Examples of ML that are commonly used include Naive Bayes (NB), k-Nearest Neighbor (k-NN), Support Vector Machine (SVM), and Decision Tree (DT). This research was conducted based on an AI model development background and the need for a system to diagnose COVID-19 quickly and accurately. The aim was to classify the aforementioned CNN models with ML algorithms and compare the models’ accuracy before and after Bayesian optimization using CXR lung images with a total of 2000 data. Consequently, the CNN extracted 80% of the training data and 20% for testing, which was assigned to four different ML models for classification with the use of Bayesian optimization to ensure the best accuracy. It was observed that the best model classification was generated by the MobileNetV2-SVM structure with an accuracy of 93%. Therefore, the accuracy obtained using the SVM algorithm is higher than the other three ML algorithms.


Doi: 10.28991/HIJ-2023-04-03-05

Full Text: PDF


Classification; Comparison; COVID-19; Convolution Neural Network (CNN); Machine Learning; Bayesian Optimization.


Harahap, M., Laia, E. M., Sitanggang, L. S., Sinaga, M., Sihombing, D. F., & Husein, A. M. (2022). Detection of Covid-19 Disease in X-Ray Images Using a Convolutional Neural Network (CNN) Approach. Jurnal RESTI (Rekayasa Sistem Dan Teknologi Informasi), 6(1), 70–77. doi:10.29207/resti.v6i1.3373. (In Indonesian).

Aslan, N., Ozmen Koca, G., Kobat, M. A., & Dogan, S. (2022). Multi-classification deep CNN model for diagnosing COVID-19 using iterative neighborhood component analysis and iterative ReliefF feature selection techniques with X-ray images. Chemometrics and Intelligent Laboratory Systems, 224, 104539. doi:10.1016/j.chemolab.2022.104539.

Vaishya, R., Javaid, M., Khan, I. H., & Haleem, A. (2020). Artificial Intelligence (AI) applications for COVID-19 pandemic. Diabetes & Metabolic Syndrome: Clinical Research and Reviews, 14(4), 337–339. doi:10.1016/j.dsx.2020.04.012.

Zhuang, F., Qi, Z., Duan, K., Xi, D., Zhu, Y., Zhu, H., Xiong, H., & He, Q. (2021). A Comprehensive Survey on Transfer Learning. Proceedings of the IEEE, 109(1), 43–76. doi:10.1109/JPROC.2020.3004555.

Roihan, A., Sunarya, P. A., & Rafika, A. S. (2020). Pemanfaatan Machine Learning Dalam Berbagai Bidang: Review paper. Indonesian Journal on Computer and Information Technology, 5(1), 75–82. doi:10.31294/ijcit.v5i1.7951.

Thakur, S., & Kumar, A. (2021). X-ray and CT-scan-based automated detection and classification of covid-19 using convolutional neural networks (CNN). Biomedical Signal Processing and Control, 69. doi:10.1016/j.bspc.2021.102920.

Bergstra, J., & Bengio, Y. (2012). Random search for hyper-parameter optimization. Journal of machine learning research, 13(2), 281-305.

Yao, Y., Cao, J., Ma, Z. (2018). A Cost-Effective Deadline-Constrained Scheduling Strategy for a Hyperparameter Optimization Workflow for Machine Learning Algorithms. Service-Oriented Computing. ICSOC 2018. Lecture Notes in Computer Science, 11236. Springer, Cham, Switzerland. doi:10.1007/978-3-030-03596-9_62.

Aslan, M. F., Sabanci, K., Durdu, A., & Unlersen, M. F. (2022). COVID-19 diagnosis using state-of-the-art CNN architecture features and Bayesian Optimization. Computers in Biology and Medicine, 142(January), 105244, 1-11. doi:10.1016/j.compbiomed.2022.105244.

Yasar, H., & Ceylan, M. (2020). A novel comparative study for detection of Covid-19 on CT lung images using texture analysis, machine learning, and deep learning methods. Multimedia Tools and Applications, 80(4), 5423–5447. doi:10.1007/s11042-020-09894-3.

Das, A. (2021). Adaptive UNet-based Lung Segmentation and Ensemble Learning with CNN-based Deep Features for Automated COVID-19 Diagnosis. Multimedia Tools and Applications, 81(4), 5407–5441. doi:10.1007/s11042-021-11787-y.

Sethi, R., Mehrotra, M., & Sethi, D. (2020). Deep Learning based Diagnosis Recommendation for COVID-19 using Chest X-Rays Images. 2020 Second International Conference on Inventive Research in Computing Applications (ICIRCA). doi:10.1109/icirca48905.2020.9183278.

Kundu, R., Singh, P. K., Mirjalili, S., & Sarkar, R. (2021). COVID-19 detection from lung CT-Scans using a fuzzy integral-based CNN ensemble. Computers in Biology and Medicine, 138, 104895. doi:10.1016/j.compbiomed.2021.104895.

Ardakani, A. A., Kanafi, A. R., Acharya, U. R., Khadem, N., & Mohammadi, A. (2020). Application of deep learning technique to manage COVID-19 in routine clinical practice using CT images: Results of 10 convolutional neural networks. Computers in Biology and Medicine, 121, 103795. doi:10.1016/j.compbiomed.2020.103795.

Loey, M., El-Sappagh, S., & Mirjalili, S. (2022). Bayesian-based optimized deep learning model to detect COVID-19 patients using chest X-ray image data. Computers in Biology and Medicine, 142, 105213. doi:10.1016/j.compbiomed.2022.105213.

Turkoglu, M. (2021). COVIDetectioNet: COVID-19 diagnosis system based on X-ray images using features selected from pre-learned deep features ensemble. Applied Intelligence, 51(3), 1213–1226. doi:10.1007/s10489-020-01888-w.

Sameen, M. I., Pradhan, B., & Lee, S. (2020). Application of convolutional neural networks featuring Bayesian optimization for landslide susceptibility assessment. Catena, 186, 104249. doi:10.1016/j.catena.2019.104249.

Doke, P., Shrivastava, D., Pan, C., Zhou, Q., & Zhang, Y. D. (2020). Using CNN with Bayesian optimization to identify cerebral micro-bleeds. Machine Vision and Applications, 31(5), 0–19. doi:10.1007/s00138-020-01087-0.

Enaizan, O., Saleh, A., Eneizan, B., Almaaitah, M., & Alsakarneh, A. (2022). Understanding and Predicting the Determinants of Consumers’ Acceptance and Usage of M-commerce Application: Hybrid SEM and Neural Network Approach. Emerging Science Journal, 6(6), 1507-1524. doi:10.28991/ESJ-2022-06-06-018.

Li, Z., Liu, F., Yang, W., Peng, S., & Zhou, J. (2022). A Survey of Convolutional Neural Networks: Analysis, Applications, and Prospects. IEEE Transactions on Neural Networks and Learning Systems, 33(12), 6999–7019. doi:10.1109/TNNLS.2021.3084827.

Akhtar, M. B. (2022). The use of a convolutional neural network in detecting soldering faults from a printed circuit board assembly. HighTech and Innovation Journal, 3(1), 1-14. doi:10.28991/HIJ-2022-03-01-01.

Tien Bui, D., Pradhan, B., Lofman, O., & Revhaug, I. (2012). Landslide susceptibility assessment in Vietnam using support vector machines, decision tree, and nave bayes models. Mathematical Problems in Engineering, 2012. doi:10.1155/2012/974638.

Sunarya, P. O. A., Refianti, R., Mutiara, A. B., & Octaviani, W. (2019). Comparison of accuracy between convolutional neural networks and Naïve Bayes Classifiers in sentiment analysis on Twitter. International Journal of Advanced Computer Science and Applications, 10(5), 77–86. doi:10.14569/ijacsa.2019.0100511.

Zhang, S. (2020). Adaption of Naïve Bayes Classifier in Various Fields. 2020 3rd International Conference on Economic Management and Green Development (ICEMGD 2020), 1-2 August, 2020, Stanford University, Stanford, United States.

Charbuty, B., & Abdulazeez, A. (2021). Classification Based on Decision Tree Algorithm for Machine Learning. Journal of Applied Science and Technology Trends, 2(01), 20–28. doi:10.38094/jastt20165.

Fan, Z., Xie, J. K., Wang, Z. Y., Liu, P. C., Qu, S. J., & Huo, L. (2021). Image Classification Method Based on Improved KNN Algorithm. Journal of Physics: Conference Series, 1930, 012009. doi:10.1088/1742-6596/1930/1/012009.

Huang, S., Nianguang, C. A. I., Penzuti Pacheco, P., Narandes, S., Wang, Y., & Wayne, X. U. (2018). Applications of support vector machine (SVM) learning in cancer genomics. Cancer Genomics & Proteomics, 15(1), 41–51. doi:10.21873/cgp.20063.

Otchere, D. A., Arbi Ganat, T. O., Gholami, R., & Ridha, S. (2021). Application of supervised machine learning paradigms in the prediction of petroleum reservoir properties: Comparative analysis of ANN and SVM models. Journal of Petroleum Science and Engineering, 200, 108182. doi:10.1016/j.petrol.2020.108182.

Rizal, R. A., Girsang, I. S., & Prasetiyo, S. A. (2019). Face Classification Using Support Vector Machine (SVM). REMIK (Riset Dan E-Jurnal Manajemen Informatika Komputer), 3(2), 1. doi:10.33395/remik.v3i2.10080. (In Indonesian).

Altan, A., & Karasu, S. (2019). The effect of kernel values in support vector machine to forecasting performance of financial time series. The Journal of Cognitive Systems, 4(1), 17-21.

Patel, H. H., & Prajapati, P. (2018). Study and Analysis of Decision Tree Based Classification Algorithms. International Journal of Computer Sciences and Engineering, 6(10), 74–78. doi:10.26438/ijcse/v6i10.7478.

Ghiasi, M. M., & Zendehboudi, S. (2021). Application of decision tree-based ensemble learning in the classification of breast cancer. Computers in Biology and Medicine, 128, 104089. doi:10.1016/j.compbiomed.2020.104089.

Luo, X., Wen, X., Zhou, M. C., Abusorrah, A., & Huang, L. (2022). Decision-Tree-Initialized Dendritic Neuron Model for Fast and Accurate Data Classification. IEEE Transactions on Neural Networks and Learning Systems, 33(9), 4173–4183. doi:10.1109/TNNLS.2021.3055991.

Badriah, S., Nugroho, M. F. E., Sanjaya, N., Rismawati, I., Sari, B. N., & Rozikin, C. (2021). C4 Algorithm Classification. 5 in Determining Recipients of Covid-19 Assistance: (Case Study: Village in Karawang). Jurnal Informatika Polinema, 7(3), 23-28. (In Indonesian).

Chen, W., Yang, G., & Qi, D. (2022). Comprehensive Evaluation of College Students’ Physical Health and Sports Mode Recommendation Model Based on Decision Tree Classification Model. Computational Intelligence and Neuroscience, 2022, 1–8. doi:10.1155/2022/5504850.

Otaki, D., Nonaka, H., & Yamada, N. (2022). Thermal design optimization of electronic circuit board layout with transient heating chips by using Bayesian optimization and thermal network model. International Journal of Heat and Mass Transfer, 184, 122263. doi:10.1016/j.ijheatmasstransfer.2021.122263.

Alzubi, Y., Alqawasmeh, H., Al-Kharabsheh, B., & Abed, D. (2022). Applications of Nearest Neighbor Search Algorithm toward Efficient Rubber-Based Solid Waste Management in Concrete. Civil Engineering Journal, 8(4), 695-709. doi:10.28991/CEJ-2022-08-04-06.

Ben Atitallah, S., Driss, M., Boulila, W., & Ben Ghézala, H. (2022). Randomly initialized convolutional neural network for the recognition of COVID-19 using X-ray images. International Journal of Imaging Systems and Technology, 32(1), 55–73. doi:10.1002/ima.22654.

Full Text: PDF

DOI: 10.28991/HIJ-2023-04-03-05


  • There are currently no refbacks.

Copyright (c) 2023 Sugiyarto Surono, M Yahya Firza Afitiana, Anggi Setyawan, Dyiyah Kresna Eni Arofah, Aris Thobirin