Klasifikasi Anemia pada Data Tidak Seimbang Menggunakan Random Forest, SMOTETomek, dan GridSearchCV


Authors

  • M Alfathan Haris Sekolah Tinggi Ilmu Komputer Tunas Bangsa, Pematangsiantar, Indonesia
  • Solikhun Solikhun Sekolah Tinggi Ilmu Komputer Tunas Bangsa, Pematangsiantar, Indonesia

DOI:

https://doi.org/10.47065/bulletincsr.v6i5.1215

Keywords:

Anemia Diagnosis; Class Imbalance; GridSearchCV; Random Forest; SMOTETomek

Abstract

This study applies a Machine Learning approach to support preliminary anemia identification using image-color information and hemoglobin levels. The main issue in the dataset is an imbalanced class composition, where normal records are more numerous than anemia records and may cause the classifier to learn the majority-class pattern more strongly. To address this issue, Random Forest is integrated with SMOTETomek and GridSearchCV. The Kaggle Anemia Diagnosis dataset contains 104 records, four numerical attributes (%Red Pixel, %Green Pixel, %Blue Pixel, and Hb), and one anemia classification target. The original class distribution consists of 78 normal records and 26 anemia records. SMOTETomek is applied to the training data to balance the classes by generating synthetic minority samples and removing Tomek Links, while GridSearchCV searches for the most appropriate Random Forest hyperparameters. Model performance is assessed using 10-Fold Cross Validation and the Wilcoxon Signed-Rank Test. The proposed model obtains 97.09% accuracy, 97.50% precision, 91.67% recall, and 93.24% F1-score. The Wilcoxon p-value of 0.03125 for accuracy and F1-score indicates a significant difference at the 0.05 level. These findings indicate that the integrated Random Forest, SMOTETomek, and GridSearchCV approach improves anemia classification on imbalanced data.

Downloads

Download data is not yet available.

References

A. Z. Alem et al., “Prevalence and factors associated with anemia in women of reproductive age across low- and middle-income countries based on national data,” Sci. Rep., vol. 13, no. 1, Dec. 2023, doi: 10.1038/s41598-023-46739-z.

S. Safiri et al., “Burden of anemia and its underlying causes in 204 countries and territories, 1990–2019: results from the Global Burden of Disease Study 2019,” J. Hematol. Oncol., vol. 14, no. 1, Dec. 2021, doi: 10.1186/s13045-021-01202-2.

Fachira Kasmarini and Ratih Kurniasari, “The Indonesian Journal of Health Promotion,” Media Publikasi Promosi Kesehatan Indonesia, 2022, doi: 10.31934/mppki.v2i3.

K. Aprilianti Cia et al., “Asupan Zat Besi dan Prevalensi Anemia pada Remaja Usia 16-18 Tahun,” 2021. Accessed: May 26, 2026. [Online]. Available: https://doi.org/10.33096/woh.vi.248

Hirmayant and E. Utami, “Enhanced Heart Disease Diagnosis Using Machine Learning Algorithms: A Comparison of Feature Selection,” Jurnal RESTI, vol. 9, no. 2, pp. 385–392, Apr. 2025, doi: 10.29207/resti.v9i2.6175.

R. Faurina, M. J. Gazali, and I. D. A. Herani, “Optimization Of Disease Prediction Accuracy Through Artificial Neural Network (Ann) Algorithms In Diagnese Application,” Jurnal Teknik Informatika (Jutif), vol. 5, no. 2, pp. 339–347, Apr. 2024, doi: 10.52436/1.jutif.2024.5.2.1182.

M. M. Ahsan, S. A. Luna, and Z. Siddique, “Machine-Learning-Based Disease Diagnosis: A Comprehensive Review,” Mar. 01, 2022, MDPI. doi: 10.3390/healthcare10030541.

J. W. Asare, P. Appiahene, E. J. Arthur, S. Korankye, S. Afrifa, and E. T. Donkoh, “Detection of anemia using conjunctiva images: A smartphone application approach,” Med. Nov. Technol. Devices, vol. 18, Jun. 2023, doi: 10.1016/j.medntd.2023.100237.

M. Mansour, T. B. Donmez, M. Kutlu, and S. Mahmud, “Non-invasive detection of anemia using lip mucosa images transfer learning convolutional neural networks,” Front. Big Data, vol. 6, 2023, doi: 10.3389/fdata.2023.1291329.

J. R. Navarro-Cabrera, M. A. Valles-Coral, M. E. Farro-Roque, N. Reátegui-Lozano, and L. Arévalo-Fasanando, “Machine vision model using nail images for non-invasive detection of iron deficiency anemia in university students,” Front. Big Data, vol. 8, 2025, doi: 10.3389/fdata.2025.1557600.

J. W. Asare, W. L. Brown-Acquaye, M. M. Ujakpa, E. Freeman, and P. Appiahene, “Application of machine learning approach for iron deficiency anaemia detection in children using conjunctiva images,” Inform. Med. Unlocked, vol. 45, Jan. 2024, doi: 10.1016/j.imu.2024.101451.

R. Magdalena et al., “Convolutional Neural Network For Anemia Detection Based On Conjunctiva Palpebral Images,” Jurnal Teknik Informatika (JUTIF), 2022, doi: 10.20884/1.jutif.2022.3.2.197.

J. G. Gómez, C. Parra Urueta, D. S. Álvarez, V. Hernández Riaño, and G. Ramirez-Gonzalez, “Anemia Classification System Using Machine Learning,” Informatics, vol. 12, no. 1, Mar. 2025, doi: 10.3390/informatics12010019.

P. Appiahene, J. W. Asare, E. T. Donkoh, G. Dimauro, and R. Maglietta, “Detection of iron deficiency anemia by medical images: a comparative study of machine learning algorithms,” BioData Min., vol. 16, no. 1, Dec. 2023, doi: 10.1186/s13040-023-00319-z.

M. M. Ahsan, S. A. Luna, and Z. Siddique, “Machine-Learning-Based Disease Diagnosis: A Comprehensive Review,” Mar. 01, 2022, MDPI. doi: 10.3390/healthcare10030541.

S. Ayu Wulandari, H. Al Azies, M. Naufal, W. Adi Prasetyanto, and F. Az Zahra, “Breaking Boundaries in Diagnosis: Non-Invasive Anemia Detection Empowered by AI,” IEEE Access, vol. 12, pp. 9292–9307, 2024, doi: 10.1109/ACCESS.2017.Doi.

M. K. Zuhanda, L. Permata, Hartono, E. Ongko, and Desniarti, “Impact of Adaptive Synthetic on Naïve Bayes Accuracy in Imbalanced Anemia Detection Datasets,” Jurnal RESTI, vol. 9, no. 1, pp. 85–93, Feb. 2025, doi: 10.29207/resti.v9i1.6031.

M. Salmi, D. Atif, D. Oliva, A. Abraham, and S. Ventura, “Handling imbalanced medical datasets: review of a decade of research,” Artif. Intell. Rev., vol. 57, no. 10, Oct. 2024, doi: 10.1007/s10462-024-10884-2.

A. X. Wang, V. T. Le, H. N. Trung, and B. P. Nguyen, “Addressing imbalance in health data: Synthetic minority oversampling using deep learning,” Comput. Biol. Med., vol. 188, Apr. 2025, doi: 10.1016/j.compbiomed.2025.109830.

A. G. Coimbra et al., “Approaches for handling imbalanced data used in machine learning in the healthcare field: A case study on Chagas disease database prediction,” PLoS One, vol. 20, no. 5 May, May 2025, doi: 10.1371/journal.pone.0320966.

Y. Yang, H. A. Khorshidi, and U. Aickelin, “A review on over-sampling techniques in classification of multi-class imbalanced datasets: insights for medical problems,” 2024, Frontiers Media SA. doi: 10.3389/fdgth.2024.1430245.

J. Zhu et al., “Processing imbalanced medical data at the data level with assisted-reproduction data as an example,” BioData Min., vol. 17, no. 1, Dec. 2024, doi: 10.1186/s13040-024-00384-y.

H. Hairani, T. Widiyaningtyas, and D. Dwi Prasetya, “International Journal On Informatics Visualization journal homepage?: www.joiv.org/index.php/joiv International Journal On Informatics Visualization Addressing Class Imbalance of Health Data: a Systematic Literature Review on Modified Synthetic Minority Oversampling Technique (SMOTE) Strategies,” 2024. [Online]. Available: www.joiv.org/index.php/joiv

M. K. Zuhanda, L. Permata, Hartono, E. Ongko, and Desniarti, “Impact of Adaptive Synthetic on Naïve Bayes Accuracy in Imbalanced Anemia Detection Datasets,” Jurnal RESTI, vol. 9, no. 1, pp. 85–93, Feb. 2025, doi: 10.29207/resti.v9i1.6031.

M. I. Elim and E. Utami, “Performance Comparison of Child Stunting Prediction Support Vector Machine vs Random Forest with Grid Search Optimization,” Jurnal Teknik Informatika (Jutif), vol. 6, no. 5, pp. 5305–5319, Oct. 2025, doi: 10.52436/1.jutif.2025.6.5.5285.

H. Hairani, A. Anggrawan, and D. Priyanto, “International Journal On Informatics Visualization journal homepage?: www.joiv.org/index.php/joiv INTERNATIONAL JOURNAL ON INFORMATICS VISUALIZATION Improvement Performance of the Random Forest Method on Unbalanced Diabetes Data Classification Using Smote-Tomek Link,” 2024. [Online]. Available: www.joiv.org/index.php/joiv

Y. Y. Yuruk, “Uncover This Tech Term: Random Forest,” Sep. 01, 2025, Korean Radiological Society. doi: 10.3348/kjr.2025.0800.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Klasifikasi Anemia pada Data Tidak Seimbang Menggunakan Random Forest, SMOTETomek, dan GridSearchCV

Dimensions Badge

ARTICLE HISTORY

Published: 2026-08-13

Abstract View: 0 times
PDF Download: 0 times

How to Cite

Haris, M. A., & Solikhun, S. (2026). Klasifikasi Anemia pada Data Tidak Seimbang Menggunakan Random Forest, SMOTETomek, dan GridSearchCV. Bulletin of Computer Science Research, 6(5), 2049-2058. https://doi.org/10.47065/bulletincsr.v6i5.1215

Issue

Section

Articles