Genetic algorithm-based approach to improve the prediction of myocardial infarction complications optimization of class imbalance ratio
Introduction: This article is the result of research conducted as part of a doctoral thesis in the Computer Science Ph.D. program at the University of Cauca in 2025. Myocardial infarction (MI) is a condition associated with a high mortality rate during the first year following onset, and life-threatening complications can arise within the first few hours after hospital admission. Therefore, early prediction of these complications improves prognosis and reduces risks.
Problem: Machine learning algorithms predict potential complications; however, class imbalance in the datasets skews the predictions toward the majority class. Objective: To improve the predictive performance of an ML model by rebalancing the class distribution in the training dataset using a data-driven approach.
Methodology: The CRISP-DM methodology was adapted.
Results: We propose a genetic algorithm (GA) to identify the optimal rebalancing ratio from the data. The best-performing individual determined the optimal rebalancing ratio through random oversampling (ROS) using an XGBoost model, which correctly classified 7 out of 8 cases (F1 score: 0.36), outperforming the baseline model, which correctly classified 6 out of 8 cases (F1 score: 0.28).
Conclusions: An approach that optimizes the class-balancing ratio improves the F1 score and detects an additional class compared to the base model without class balancing. Originality: This article proposes a mechanism to find the optimal proportion with which an imbalanced dataset should be rebalanced.
Limitations: Processing is required when working with larger datasets.
How to Cite
License
Copyright (c) 2026 Ingeniería Solidaria

This work is licensed under a Creative Commons Attribution 4.0 International License.
Cession of rights and ethical commitment
As the author of the article, I declare that is an original unpublished work exclusively created by me, that it has not been submitted for simultaneous evaluation by another publication and that there is no impediment of any kind for concession of the rights provided for in this contract.
In this sense, I am committed to await the result of the evaluation by the journal Ingeniería Solidaría before considering its submission to another medium; in case the response by that publication is positive, additionally, I am committed to respond for any action involving claims, plagiarism or any other kind of claim that could be made by third parties.
At the same time, as the author or co-author, I declare that I am completely in agreement with the conditions presented in this work and that I cede all patrimonial rights, in other words, regarding reproduction, public communication, distribution, dissemination, transformation, making it available and all forms of exploitation of the work using any medium or procedure, during the term of the legal protection of the work and in every country in the world, to the Universidad Cooperativa de Colombia Press.
[1] A. Kavita, P. Sonal, and T. D. L. Nguyen, “Comparative analysis of K-NN, naïve Bayes, and logistic regression for credit card fraud detection,” Revista Ingeniería Solidaria, vol. 19, no. 3, pp. 1–22, 2023, doi: [https://doi.org/10.16925/2357-6014.2023.03.05](https://doi.org/10.16925/2357-6014.2023.03.05?utm_source=chatgpt.com). DOI: https://doi.org/10.16925/2357-6014.2023.03.05
[2] H. Allam, L. I. Makubvure, B. K. Gyamfi, K. N. Graham, and K. Akinwolere, “Text classification: How machine learning is revolutionizing text categorization,” Information, vol. 16, no. 2, Art. no. 130, 2025, doi: [https://doi.org/10.3390/info16020130](https://doi.org/10.3390/info16020130?utm_source=chatgpt.com). DOI: https://doi.org/10.3390/info16020130
[3] M. Manoj Yadav and A.-H. Ronak, “Resampling imbalanced healthcare data for predictive modelling,” International Journal of Advanced Computer Science and Applications, vol. 16, no. 2, Art. no. 36, 2025, doi: [https://doi.org/10.14569/IJACSA.2025.0160204](https://doi.org/10.14569/IJACSA.2025.0160204?utm_source=chatgpt.com). DOI: https://doi.org/10.14569/IJACSA.2025.0160204
[4] X. Xiaoying, L. Huawen, Z. Shouzhen, L. Lingbin, and L. Wen, “A novel progressively undersampling method based on the density peaks sequence for imbalanced data,” Knowledge-Based Systems, vol. 216, Art. no. 106689, 2021, doi: [https://doi.org/10.1016/j.knosys.2020.106689](https://doi.org/10.1016/j.knosys.2020.106689?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.knosys.2020.106689
[5] S. Tyagi and S. Mittal, “Sampling approaches for imbalanced data classification problem in machine learning,” in Proc. International Conference on Research in Intelligent Computing (ICRIC 2019), 2020, pp. 209–221, doi: [https://doi.org/10.1007/978-3-030-29407-6_17](https://doi.org/10.1007/978-3-030-29407-6_17?utm_source=chatgpt.com). DOI: https://doi.org/10.1007/978-3-030-29407-6_17
[6] D. Elreedy and A. F. Atiya, “A comprehensive analysis of Synthetic Minority Oversampling Technique (SMOTE) for handling class imbalance,” Information Sciences, vol. 505, pp. 32–64, 2019, doi: [https://doi.org/10.1016/j.ins.2019.07.070](https://doi.org/10.1016/j.ins.2019.07.070?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.ins.2019.07.070
[7] A. Fernández, S. García, and F. Herrera, “SMOTE for learning from imbalanced data: Progress and challenges, marking the 15-year anniversary,” Journal of Artificial Intelligence Research, vol. 61, pp. 863–905, 2018, doi: [https://doi.org/10.1613/jair.1.11192](https://doi.org/10.1613/jair.1.11192?utm_source=chatgpt.com). DOI: https://doi.org/10.1613/jair.1.11192
[8] V. Rattan, R. Mittal, J. Singh, and V. M. (ND), “Analyzing the application of SMOTE on machine learning classifiers,” in Proc. International Conference on Emerging Smart Computing and Informatics (ESCI), 2021, pp. 692–695, doi: [https://doi.org/10.1109/ESCI50559.2021.9396962](https://doi.org/10.1109/ESCI50559.2021.9396962?utm_source=chatgpt.com). DOI: https://doi.org/10.1109/ESCI50559.2021.9396962
[9] M. Mukherjee and M. Khushi, “SMOTE-ENC: A novel SMOTE-based method to generate synthetic data for nominal and continuous features,” Applied System Innovation, vol. 4, no. 1, Art. no. 18, 2021, doi: [https://doi.org/10.3390/asi4010018](https://doi.org/10.3390/asi4010018?utm_source=chatgpt.com). DOI: https://doi.org/10.3390/asi4010018
[10] D. Ishani and P. Vibha, “A comparative study of SMOTE, Borderline-SMOTE, and ADASYN oversampling techniques using different classifiers,” in Proc. 3rd International Conference on Smart Data Intelligence (ICSMDI), Trichy, India, 2023, doi: [https://doi.org/10.1109/ICSMDI57622.2023.00060](https://doi.org/10.1109/ICSMDI57622.2023.00060?utm_source=chatgpt.com). DOI: https://doi.org/10.1109/ICSMDI57622.2023.00060
[11] G. Husain, D. Nasef, R. Jose, J. Mayer, and K. Bekbol, “SMOTE vs. SMOTEENN: A study on the performance of resampling algorithms for addressing class imbalance in regression models,” Algorithms, vol. 18, no. 1, Art. no. 37, 2025. (ND) DOI: https://doi.org/10.3390/a18010037
[12] M. Altalhan, A. Algarni, and M. T.-H. Alouane, “Imbalanced data problem in machine learning: A review,” IEEE Access, vol. 13, pp. 13686–13699, 2025, doi: [https://doi.org/10.1109/ACCESS.2025.3531662](https://doi.org/10.1109/ACCESS.2025.3531662?utm_source=chatgpt.com). DOI: https://doi.org/10.1109/ACCESS.2025.3531662
[13] J. C. Rella, G. Claeskens, R. Cao, and J. M. Vilar, “Instance-dependent cost-sensitive parametric learning,” Neurocomputing, vol. 615, Art. no. 128875, 2025, doi: [https://doi.org/10.1016/j.neucom.2024.128875](https://doi.org/10.1016/j.neucom.2024.128875?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.neucom.2024.128875
[14] A. S. Desuky and S. Hussain, “An improved hybrid approach for handling class imbalance problem,” Arabian Journal for Science and Engineering, vol. 46, no. 4, pp. 3853–3864, 2021, doi: [https://doi.org/10.1007/s13369-021-05347-7](https://doi.org/10.1007/s13369-021-05347-7?utm_source=chatgpt.com). DOI: https://doi.org/10.1007/s13369-021-05347-7
[15] A. Newaz, M. S. Mohosheu, and M. A. Al Noman, “Predicting complications of myocardial infarction within several hours of hospitalization using data mining techniques,” Informatics in Medicine Unlocked, vol. 42, Art. no. 101361, 2023, doi: [https://doi.org/10.1016/j.imu.2023.101361](https://doi.org/10.1016/j.imu.2023.101361?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.imu.2023.101361
[16] H. Shang, J. Wang, Y. Cong, H. Chen, and Y. Cui, “Risk prediction models for heart failure after myocardial infarction: A systematic review,” Medicine, vol. 104, no. 30, 2025, doi: [https://doi.org/10.1097/MD.0000000000043480](https://doi.org/10.1097/MD.0000000000043480?utm_source=chatgpt.com). DOI: https://doi.org/10.1097/MD.0000000000043480
[17] UCI Machine Learning Repository, “Complications of myocardial infarction: A database for testing recognition and prediction systems,” 2020. [Online]. Available: [https://archive.ics.uci.edu/](https://archive.ics.uci.edu/?utm_source=chatgpt.com) (SD)
[18] M. Pandey and S. S. Routaray, “Feature optimized hybrid model for prediction of myocardial infarction,” F1000Research, vol. 14, Art. no. 78, 2024, doi: [https://doi.org/10.12688/f1000research.160393.1](https://doi.org/10.12688/f1000research.160393.1?utm_source=chatgpt.com). DOI: https://doi.org/10.12688/f1000research.160393.1
[19] W. H. Elashmawi, A. Tamer, and A. Nasr, “Multi-target classification for predicting myocardial infarction complications: A comparative analysis of various machine learning techniques,” in Proc. International Mobile, Intelligent, and Ubiquitous Computing Conference (MIUCC), 2024, doi: [https://doi.org/10.1109/MIUCC62295.2024.10783524](https://doi.org/10.1109/MIUCC62295.2024.10783524?utm_source=chatgpt.com). DOI: https://doi.org/10.1109/MIUCC62295.2024.10783524
[20] O. D. Luaces, J. R. Quevedo, J. Díez, C. J. Bahamonde, and A. Alonso, “Binary relevance efficacy for multilabel classification,” Progress in Artificial Intelligence, vol. 1, no. 4, pp. 303–313, 2012, doi: [https://doi.org/10.1007/s13748-012-0030-x](https://doi.org/10.1007/s13748-012-0030-x?utm_source=chatgpt.com). DOI: https://doi.org/10.1007/s13748-012-0030-x
[21] D. J. Touw, “Classifier chain networks for multi-label classification,” Expert Systems with Applications, vol. 286, (ND), 2024, doi: [https://doi.org/10.48550/arXiv.2411.02638](https://doi.org/10.48550/arXiv.2411.02638?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.eswa.2025.128048
[22] E. A. Cherman, M. C. Monard, and J. Metz, “Multi-label problem transformation methods: A case study,” CLEI Electronic Journal, vol. 14, no. 1, 2011. (SD) DOI: https://doi.org/10.19153/cleiej.14.1.4
[23] A. G. C. de Sá, P. G. P. Gomes, L. P. (SD), A. A. (SD), and F. (SD), “A robust experimental evaluation of automated multi-label classification methods,” in Proc. Genetic and Evolutionary Computation Conference (GECCO), 2020, pp. 175–183, doi: [https://doi.org/10.1145/3377930.3390231](https://doi.org/10.1145/3377930.3390231?utm_source=chatgpt.com). DOI: https://doi.org/10.1145/3377930.3390231
[24] R. Wirth and J. Hipp, “CRISP-DM: Towards a standard process model for data mining,” in Proc. 4th International Conference on Practical Applications of Knowledge Discovery and Data Mining, 2000, pp. 29–39.
[25] E. Emmanuel et al., “A survey on missing data in machine learning,” Journal of Big Data, vol. 8, no. 1, Art. no. 140, 2021, doi: [https://doi.org/10.1186/s40537-021-00516-9](https://doi.org/10.1186/s40537-021-00516-9?utm_source=chatgpt.com). DOI: https://doi.org/10.1186/s40537-021-00516-9
[26] S. Katoch, S. Chauhan, and V. Kumar, “A review on genetic algorithm: Past, present, and future,” Multimedia Tools and Applications, vol. 80, no. 5, pp. 8091–8126, 2021, doi: [https://doi.org/10.1007/s11042-020-10139-6](https://doi.org/10.1007/s11042-020-10139-6?utm_source=chatgpt.com). DOI: https://doi.org/10.1007/s11042-020-10139-6
[27] T. Akiba, S. Sano, T. Yanase, T. Ohta, and M. Koyama, “Optuna: A next-generation hyperparameter optimization framework,” in Proc. 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2019, pp. 2623–2631, doi: [https://doi.org/10.1145/3292500.3330701](https://doi.org/10.1145/3292500.3330701?utm_source=chatgpt.com). DOI: https://doi.org/10.1145/3292500.3330701
[28] Y. Zhang, J. Peng, Y. Sun, and Y. (ND), “Research and application of XGBoost in imbalanced data,” International Journal of Distributed Sensor Networks, vol. 18, no. 6, 2022, doi: [https://doi.org/10.1177/155013292211069](https://doi.org/10.1177/155013292211069?utm_source=chatgpt.com). DOI: https://doi.org/10.1177/15501329221106935
[29] B. Taha Jijo and A. Mohsin Abdulazeez, “Classification based on decision tree algorithm for machine learning,” Journal of Applied Science and Technology Trends, vol. 2, no. 1, pp. 20–28, 2021, doi: [https://doi.org/10.38094/jastt20165](https://doi.org/10.38094/jastt20165?utm_source=chatgpt.com). DOI: https://doi.org/10.38094/jastt20165
[30] A. Parmar, R. Katariya, and V. Patel, “A review on random forest: An ensemble classifier,” in Proc. International Conference on Intelligent Data Communication Technologies and Internet of Things (ICICI), 2018, pp. 758–763, doi: [https://doi.org/10.1007/978-3-030-03146-6_86](https://doi.org/10.1007/978-3-030-03146-6_86?utm_source=chatgpt.com). DOI: https://doi.org/10.1007/978-3-030-03146-6_86
[31] A. Choudhury, A. Mondal, and S. Sarkar, “Searches for the BSM scenarios at the LHC using decision tree-based machine learning algorithms: A comparative study and review of Random Forest, AdaBoost, XGBoost, and LightGBM frameworks,” The European Physical Journal Special Topics, vol. 233, no. 15, pp. 2425–2463, 2024, doi: [https://doi.org/10.1140/epjs/s11734-024-01308-x](https://doi.org/10.1140/epjs/s11734-024-01308-x?utm_source=chatgpt.com). DOI: https://doi.org/10.1140/epjs/s11734-024-01308-x
[32] A. Tharwat, “Classification assessment methods,” Applied Computing and Informatics, vol. 17, no. 1, pp. 168–192, 2021, doi: [https://doi.org/10.1016/j.aci.2018.08.003](https://doi.org/10.1016/j.aci.2018.08.003?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.aci.2018.08.003
[33] G. Menardi and N. Torelli, “Training and assessing classification rules with imbalanced data,” Data Mining and Knowledge Discovery, vol. 28, no. 1, pp. 92–122, 2014, doi: [https://doi.org/10.1007/s10618-012-0295-5](https://doi.org/10.1007/s10618-012-0295-5?utm_source=chatgpt.com). DOI: https://doi.org/10.1007/s10618-012-0295-5
[34] C. Schröer, F. Kruse, and J. M. Gómez, “A systematic literature review on applying the CRISP-DM process model,” Procedia Computer Science, vol. 181, pp. 526–534, 2021, doi: [https://doi.org/10.1016/j.procs.2021.01.199](https://doi.org/10.1016/j.procs.2021.01.199?utm_source=chatgpt.com). DOI: https://doi.org/10.1016/j.procs.2021.01.199




