CESS (Journal of Computer Engineering, System and Science)
Vol 8, No 2 (2023): July 2023

Implementation of K Nearest Neighbor in Detecting Heart Disease with Various Training Data

Rifki Kosasih (Universitas Gunadarma)
Iffatul Mardhiyah (Universitas Gunadarma)



Article Info

Publish Date
01 Jul 2023

Abstract

Salah satu organ penting dalam tubuh manusia adalah jantung, Jika jantung mengalami gangguan maka dapat menyebabkan penyakit jantung. Untuk mendeteksi adanya penyakit jantung biasanya dilakukan dengan berkonsultasi dengan tenaga medis. Akan tetapi dengan semakin banyaknya pasien di rumah sakit akan dapat memperlambat pendeteksian penyakit jantung. Oleh karena itu dibutuhkan suatu sistem yang dapat membantu tenaga medis dalam mempercepat pendeteksian penyakit jantung. Dalam penelitian ini diusulkan untuk menggunakan pendekatan machine learning seperti metode K Nearest Neighbor (KNN) dalam mendeteksi penyakit jantung. Data yang digunakan sebanyak 1025 pasien dengan 13 fitur seperti umur, jenis kelamin, rasa sakit di dada, tekanan darah saat sedang istirahat, kadar kolesterol, gula darah, hasil elektrografik saat sedang istirahat, detak jantung maksimal, jika mengalami nyeri dada saat latihan, depresi yang diinduksi oleh latihan relatif, kemiringan puncak ST segmen, jumlah pembuluh darah yang berwarna setelah diwarnai flourosopy dan tipe kerusakan pembuluh darah. Pada penelitian ini dilakukan tiga skema pembagian data latih dan data uji dengan rasio 60:40, 70:30 dan 80:20. Berdasarkan hasil pengujian diperoleh bahwa tingkat akurasi, presisi dan recall tertinggi terjadi Ketika rasio data latih dan data uji 70:30 yaitu sebesar 97,0779% untuk akurasi, 97,9166% untuk presisi dan 95,9183% untuk recall.One of the important organs in humans is the heart. If the heart is disturbed, it can cause heart disease. To detect the presence of heart disease is usually done in consultation with doctor. However, with the increasing number of patients in the hospital, it will be able to slow down the detection of heart disease. Therefore, we need a system that can assist doctors in accelerating the detection of heart disease. In this study, we propose to use a machine learning approach i.e., K Nearest Neighbor (KNN) method in detecting heart disease. The data used were 1025 patients with 13 features i.e., age, gender, chest pain, blood pressure, cholesterol, blood sugar, electrographic results, maximum heart rate, if you experience chest pain during exercise, depression which exercise-induced relative, peak slope, number of blood vessels after fluoroscopy and type of vessel damage. In this study, we have three schemes in divide training data and test data with ratios of 60:40, 70:30 and 80:20. Based on the test results, it was found that the highest levels of accuracy, precision and recall occurred when the ratio of training data and test data was 70:30, which was 97.0779% for accuracy, 97,9166 for precision and 95,9183% for recall.

Copyrights © 2023






Journal Info

Abbrev

cess

Publisher

Subject

Computer Science & IT

Description

CESS (Journal of Computer Engineering, System and Science) contains articles on research results and conceptual studies in the fields of informatics engineering, computer science and information systems. The main topics published include: 1. Information security 2. Computer security 3. Networking & ...