Evaluation and Comparison of K-Nearest Neighbors Algorithm Models for Heart Failure Prediction


  • Alya Masitha Institut Teknologi Statistika dan Bisnis Muhammadiyah Semarang, Indonesia
  • Nurul Huda * Mail Institut Teknologi Statistika dan Bisnis Muhammadiyah Semarang, Indonesia
  • Deden Istiawan Institut Teknologi Statistika dan Bisnis Muhammadiyah Semarang, Indonesia
  • Lucky Nur Rohman Firdaus Institut Teknologi Statistika dan Bisnis Muhammadiyah Semarang, Indonesia
  • (*) Corresponding Author
Keywords: K-NN; Normalization; Min-Max; Simple Feature Scale; Heart Failure

Abstract

Heart failure is a disease that is one of the most crucial in the world. Researchers have used several machine learning techniques to assist health professionals in the diagnosis of heart failure. K-NN is a technique of supervised learning algorithm that has been successfully used in terms of classification. However, using the K-NN algorithm has stages in terms of data analysis. The data used must also be processed in such a way that it becomes data that is easier to analyse and that the results obtained are also more accurate. Data pre-processing involves transforming raw data into a format that is appropriate for the model. The normalization technique is one of the techniques contained in pre-processing. This research uses two normalization techniques, namely the simple feature scale and min-max. The purpose of this study is to compare the performance of the KNN model to obtain an optimal prediction model. This study contributes to producing a heart failure prediction model based on the K-Nearest Neighbors (KNN) algorithm that can be optimized to improve the accuracy of early detection, so that it can help medical personnel in making more appropriate clinical decisions. The results obtained from this research show that the dataset that uses the min-max normalization method is better than data that is not normalized and data that uses simple feature scale normalization. The highest level of accuracy was achieved by employing the min-max normalisation technique, with a value of K=9, resulting in an accuracy rate of 85.05%.

Downloads

Download data is not yet available.

References

B. Rahman, H. L. Hendric Spits Warnars, B. Subirosa Sabarguna, and W. Budiharto, “Heart Disease Classification Model Using K-Nearest Neighbor Algorithm,” 2021 6th Int. Conf. Informatics Comput. ICIC 2021, 2021, doi: 10.1109/ICIC54025.2021.9632918.

H. A. U. Rehman, C.-Y. Lin, and Z. Mushtaq, “Effective K-Nearest Neighbor Algorithms Performance Analysis of Thyroid Disease,” J. Chinese Inst. Eng., vol. 44, no. 1, pp. 77–87, Jan. 2021, doi: 10.1080/02533839.2020.1831967.

J. C. Youn et al., “Cardiovascular disease burden in adult patients with cancer: An 11-year nationwide population-based cohort study,” Int. J. Cardiol., vol. 317, pp. 167–173, 2020, doi: 10.1016/j.ijcard.2020.04.080.

G. S. Reddy Thummala and R. Baskar, “Prediction of Heart Disease using Decision Tree in Comparison with KNN to Improve Accuracy,” pp. 1–5, 2022, doi: 10.1109/icses55317.2022.9914044.

A. A. Shanbhag, C. Shetty, A. Ananth, A. S. Shetty, K. Kavanashree Nayak, and B. R. Rakshitha, “Heart Attack Probability Analysis Using Machine Learning,” 2021 IEEE Int. Conf. Distrib. Comput. VLSI, Electr. Circuits Robot. Discov. 2021 - Proc., pp. 301–306, 2021, doi: 10.1109/DISCOVER52564.2021.9663631.

D. Chicco and G. Jurman, “Machine Learning Can Predict Survival of Patients with Heart Failure from Serum Creatinine and Ejection Fraction Alone,” BMC Med. Inform. Decis. Mak., vol. 20, no. 1, pp. 1–16, 2020, doi: 10.1186/s12911-020-1023-5.

F. Meng et al., “Machine learning for prediction of sudden cardiac death in heart failure patients with low left ventricular ejection fraction: study protocol for a retroprospective multicentre registry in China,” BMJ Open, vol. 9, no. 5, p. e023724, May 2019, doi: 10.1136/bmjopen-2018-023724.

A. Ishaq et al., “Improving the Prediction of Heart Failure Patients’ Survival Using SMOTE and Effective Data Mining Techniques,” IEEE Access, vol. 9, pp. 39707–39716, 2021, doi: 10.1109/ACCESS.2021.3064084.

M. Mamun, A. Farjana, M. Al Mamun, M. S. Ahammed, and M. M. Rahman, “Heart failure survival prediction using machine learning algorithm: am I safe from heart failure?,” in 2022 IEEE World AI IoT Congress (AIIoT), Jun. 2022, pp. 194–200, doi: 10.1109/AIIoT54504.2022.9817303.

A. Syukur, D. Istiawan, W. Sulistijanti, and A. Ilham, “Hybrid genetic feature selection and support vector machine for prediction LQ45 index in Indonesia stock exchange,” in AIP Conference Proceedings, 2023, vol. 2720, p. 020017, doi: 10.1063/5.0153673.

P. Rahman, A. Rifat, I. A. Chy, M. M. Khan, M. Masud, and S. Aljahdali, “Machine Learning and Artificial Neural Network for Predicting Heart Failure Risk,” Comput. Syst. Sci. Eng., vol. 44, no. 1, pp. 757–775, 2022, doi: 10.32604/csse.2023.021469.

I. Mahmud, M. M. Kabir, M. F. Mridha, S. Alfarhood, M. Safran, and D. Che, “Cardiac Failure Forecasting Based on Clinical Data Using a Lightweight Machine Learning Metamodel,” Diagnostics, vol. 13, no. 15, p. 2540, Jul. 2023, doi: 10.3390/diagnostics13152540.

R. W. Putri, A. Ristyawan, and M. N. Muzaki, “Comparison Performance of K-NN and NBC Algorithm for Classification of Heart Disease,” JTECS J. Sist. Telekomun. Elektron. Sist. Kontrol Power Sist. dan Komput., vol. 2, no. 2, p. 143, Jul. 2022, doi: 10.32503/jtecs.v2i2.2708.

T. A. Assegie, S. J. Sushma, B. G. Bhavya, and S. Padmashree, “Correlation Analysis for Determining Effective Data in Machine Learning: Detection of Heart Failure,” SN Comput. Sci., vol. 2, no. 3, pp. 1–5, 2021, doi: 10.1007/s42979-021-00617-5.

A. Masitha, M. K. Biddinika, and H. Herman, “K Value Effect on Accuracy Using the K-NN for Heart Failure Dataset,” MATRIK J. Manajemen, Tek. Inform. dan Rekayasa Komput., vol. 22, no. 3, pp. 593–604, 2023, doi: 10.30812/matrik.v22i3.2984.

C. Sowmiya and P. Sumitra, “Analytical study of heart disease diagnosis using classification techniques,” Proc. 2017 IEEE Int. Conf. Intell. Tech. Control. Optim. Signal Process. INCOS 2017, vol. 2018-Febru, pp. 1–5, 2018, doi: 10.1109/ITCOSP.2017.8303115.

H. Hartatik, M. B. Tamam, and A. Setyanto, “Prediction for Diagnosing Liver Disease in Patients using KNN and Naïve Bayes Algorithms,” 2020 2nd Int. Conf. Cybern. Intell. Syst. ICORIS 2020, 2020, doi: 10.1109/ICORIS50180.2020.9320797.

N. Huda, A. Y. Dewi, and A. Mahiruna, “Plasmodium falciparum Identification Using Otsu Thresholding Segmentation Method Based on Microscopic Blood Image,” Sci. J. Informatics, vol. 10, no. 4, 2023, doi: https://doi.org/10.15294/sji.v10i4.47924.

Y. Liang and C. Guo, “Heart failure disease prediction and stratification with temporal electronic health records data using patient representation,” Biocybern. Biomed. Eng., vol. 43, no. 1, pp. 124–141, Jan. 2023, doi: 10.1016/j.bbe.2022.12.008.

C. Fan, M. Chen, X. Wang, J. Wang, and B. Huang, “A Review on Data Preprocessing Techniques Toward Efficient and Reliable Knowledge Discovery from Building Operational Data,” Front. Energy Res., vol. 9, p. 652801, 2021, doi: 10.3389/fenrg.2021.652801.

P. Ghosh et al., “Efficient Prediction of Cardiovascular Disease Using Machine Learning Algorithms With Relief and LASSO Feature Selection Techniques,” IEEE Access, vol. 9, pp. 19304–19326, 2021, doi: 10.1109/ACCESS.2021.3053759.

C. V. Gonzalez Zelaya, “Towards explaining the effects of data preprocessing on machine learning,” Proc. - Int. Conf. Data Eng., vol. 2019-April, pp. 2086–2090, 2019, doi: 10.1109/ICDE.2019.00245.

Imran, F. Qayyum, D.-H. Kim, S.-J. Bong, S.-Y. Chi, and Y.-H. Choi, “A Survey of Datasets, Preprocessing, Modeling Mechanisms, and Simulation Tools Based on AI for Material Analysis and Discovery,” Materials (Basel)., vol. 15, no. 4, p. 1428, Feb. 2022, doi: 10.3390/ma15041428.

P. Mamatha Alex and S. P. Shaji, “Prediction and diagnosis of heart disease patients using data mining technique,” Proc. 2019 IEEE Int. Conf. Commun. Signal Process. ICCSP 2019, pp. 848–852, 2019, doi: 10.1109/ICCSP.2019.8697977.

A. Masitha, M. K. Biddinika, and Herman, “Preparing Dual Data Normalization for KNN Classfication in Prediction of Heart Failure,” Klik - Kumpul. J. Ilmu Komput., vol. 4, no. 3, pp. 1227–1234, 2023.

B. Lewandowicz and K. Kisiała, “Comparison of Support Vector Machine, Naive Bayes, and K-Nearest Neighbors Algorithms for Classifying Heart Disease,” Commun. Comput. Inf. Sci., vol. 1979, pp. 274–285, 2024, doi: 10.1007/978-3-031-48981-5_22.

A. Kumar, E. R. Khan, and Deepika, “A Review On Heart Disease Detection Using Machine Learning Techniques,” in 2024 Sixth International Conference on Computational Intelligence and Communication Technologies (CCICT), Apr. 2024, pp. 317–323, doi: 10.1109/CCICT62777.2024.00059.

P. Tabaghi, I. Dokmanić, and M. Vetterli, “Kinetic Euclidean Distance Matrices,” IEEE Trans. Signal Process., vol. 68, pp. 452–465, 2020, doi: 10.1109/TSP.2019.2959260.

A. R. Lubis, M. Lubis, and Al-Khowarizmi, “Optimization of distance formula in k-nearest neighbor method,” Bull. Electr. Eng. Informatics, vol. 9, no. 1, pp. 326–338, 2020, doi: 10.11591/eei.v9i1.1464.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Evaluation and Comparison of K-Nearest Neighbors Algorithm Models for Heart Failure Prediction

Dimensions Badge
Article History
Submitted: 2024-09-17
Published: 2024-12-03
Abstract View: 83 times
PDF Download: 64 times
How to Cite
Masitha, A., Huda, N., Istiawan, D., & Firdaus, L. N. R. (2024). Evaluation and Comparison of K-Nearest Neighbors Algorithm Models for Heart Failure Prediction. Building of Informatics, Technology and Science (BITS), 6(3), 1332-1340. https://doi.org/10.47065/bits.v6i3.5925
Issue
Section
Articles