Implementasi Federated Learning untuk Klasifikasi Penyakit dengan Dataset Tidak Seimbang
DOI:
https://doi.org/10.64803/ikosstemi.v2.148Keywords:
Federeted Learning, Random Forest, Imbalanced Data, Stroke Prediction, Machine LearningAbstract
Imbalanced data is one of the main challenges in applying machine learning to stroke disease classification, where the number of stroke patient data is significantly smaller than non-stroke patient data. This condition causes classification models to become biased toward the majority class, resulting in poor detection of stroke cases. In addition, centralized learning approaches raise privacy and security concerns due to the sensitive nature of patient data. Therefore, this study proposes a Federated Learning Random Forest (FL-RF) approach to improve classification performance on imbalanced data while preserving data privacy. The study uses the Cerebral Stroke Prediction – Imbalanced Dataset obtained from Kaggle. The research stages include data preprocessing, semi non-IID data distribution across multiple clients, local training using Balanced Random Forest, and model aggregation within a federated learning environment. Model evaluation was conducted using accuracy, precision, recall, F1-score, confusion matrix, and ROC curve metrics. The results show that the conventional Random Forest achieved an accuracy of 0.9817 but failed to detect the minority class. Meanwhile, the proposed FL-RF model obtained an accuracy of 0.7976 with an improved recall of 0.56 and an F1-score of 0.0910 for the stroke class. These findings indicate that the FL-RF approach is more effective in improving sensitivity toward minority classes compared to conventional Random Forest.
References
Araf, I., Idri, A., & Chairi, I. (2024). Cost ‑ sensitive learning for imbalanced medical data : a review. In Artificial Intelligence Review (Vol. 57, Issue 4). Springer Netherlands. https://doi.org/10.1007/s10462-023-10652-8
Aubaidan, B. H., Kadir, R. A., Lajb, M. T., Anwar, M., Qureshi, K. N., Taha, B. A., & Ghafoor, K. (2025). A review of intelligent data analysis: Machine learning approaches for addressing class imbalance in healthcare-challenges and perspectives. Intelligent Data Analysis, 29(3), 699–719.
Benjamin, E. J., Muntner, P., Alonso, A., Bittencourt, M. S., Callaway, C. W., Carson, A. P., Chamberlain, A. M., Chang, A. R., Cheng, S., Das, S. R., & others. (2019). Heart disease and stroke statistics—2019 update: a report from the American Heart Association. Circulation, 139(10), e56--e528.
Chen, Z., Yang, C., Zhu, M., Peng, Z., & Yuan, Y. (2022). Personalized Retrogress-Resilient Federated Learning Towards Imbalanced Medical Data. IEEE Transactions on Medical Imaging, 41(12), 3663–3674.
Chicco, D., & Jurman, G. (2020). The advantages of the Matthews correlation coefficient ( MCC ) over F1 score and accuracy in binary classification evaluation. 1–13.
Choi, G., Cha, W. C., Lee, S. U., & Shin, S. (2024). Survey of Medical Applications of Federated Learning. 30(1), 3–15.
Fernández, A., Garc’ia, S., Galar, M., Prati, R. C., Krawczyk, B., & Herrera, F. (2018). Learning from imbalanced data sets (Vol. 10, Issue 2018). Springer.
Gholampour, S. (2024). Impact of Nature of Medical Data on Machine and Deep Learning for Imbalanced Datasets : Clinical Validity of SMOTE Is Questionable. 827–841.
Guan, H., Yap, P., Bozoki, A., & Liu, M. (2024). Federated learning for medical image analysis: A survey. 1–43. https://doi.org/10.1016/j.patcog.2024.110424.Federated
Gurcan, F., & Soylu, A. (2024). Learning from imbalanced data: integration of advanced resampling techniques and machine learning models for enhanced cancer diagnosis and prognosis. Cancers, 16(19), 3417.
Hellín, C. J., Olmedo, A. A., & Tayebi, A. (2024). applied sciences Unraveling the Impact of Class Imbalance on Deep-Learning Models for Medical Image Classification.
Johnson, K. W., Torres Soto, J., Glicksberg, B. S., Shameer, K., Miotto, R., Ali, M., Ashley, E., & Dudley, J. T. (2018). Artificial intelligence in cardiology. Journal of the American College of Cardiology, 71(23), 2668–2679.
Liu, W., Mo, J., & Zhong, F. (2023). applied sciences Class Imbalanced Medical Image Classification Based on Semi-Supervised Federated Learning.
Markovic, T., Leon, M., Buffoni, D., & Punnekkat, S. (2024). Random forest with differential privacy in federated learning framework for network attack detection and classification. 8132–8153. https://doi.org/10.1007/s10489-024-05589-6
Mujahid, M., Kina, E., Rustam, F., Villar, M. G., Alvarado, E. S., De La Torre Diez, I., & Ashraf, I. (2024). Data oversampling and imbalanced datasets: an investigation of performance for machine learning and feature engineering. Journal of Big Data, 11(1), 87.
Pais, V., Rao, S., & Muniyal, B. (2025). Healthcare federated learning: a survey of applications and frameworks. International Journal of Computers and Applications, 47(6), 532–551.
Pes, B. (2021). Learning from High-Dimensional and Class-Imbalanced Datasets Using Random Forests.
Probst, P., Wright, M., & Boulesteix, A. (2019). Hyperparameters and Tuning Strategies for Random Forest. 2010, 1–19.
Rieke, N., Hancox, J., Li, W., Milletarì, F., Roth, H. R., Albarqouni, S., Bakas, S., Galtier, M. N., Landman, B. A., Maier-hein, K., Ourselin, S., Sheller, M., & Summers, R. M. (2020). The future of digital health with federated learning. Npj Digital Medicine, 1–7. https://doi.org/10.1038/s41746-020-00323-1
Salmi, M., Atif, D., Oliva, D., Abraham, A., & Ventura, S. (2024). Handling imbalanced medical datasets : review of a decade of research. In Artificial Intelligence Review (Vol. 57, Issue 10). Springer Netherlands. https://doi.org/10.1007/s10462-024-10884-2
Sarker, I. H. (2021). Machine learning: Algorithms, real-world applications and research directions. SN Computer Science, 2(3), 1–21.
Wang, L., Xu, S., Wang, X., & Zhu, Q. (2021). Addressing Class Imbalance in Federated Learning.
Zhao, H., Zhao, C., Zhang, X., Liu, N., Zhu, H., Liu, Q., & Xiong, H. (2023). An ensemble learning approach with gradient resampling for class-imbalance problems. INFORMS Journal on Computing, 35(4), 747–763.
Zheng, Y., Li, C., Zhou, X., Chen, H., Xu, H., Li, Y., Zhang, H., Li, X., Sun, H., Huang, X., & Grzegorzek, M. (2023). Application of transfer learning and ensemble learning in image-level classification for breast histopathology. 3(May 2022), 115–128.
Zhu, J., Pu, S., He, J., Su, D., Cai, W., Xu, X., & Liu, H. (2024). Processing imbalanced medical data at the data level with assisted-reproduction data as an example.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Syarifah Yusnaini Putri, Nia Ramadani, Andre Hasudungan Lubis (Author)

This work is licensed under a Creative Commons Attribution 4.0 International License.






