{"title":"Implementation of K Nearest Neighbor in Detecting Heart Disease with Various Training Data","authors":"R. Kosasih, Iffatul Mardhiyah","doi":"10.24114/cess.v8i2.44303","DOIUrl":null,"url":null,"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.","PeriodicalId":53361,"journal":{"name":"CESS Journal of Computer Engineering System and Science","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2023-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"CESS Journal of Computer Engineering System and Science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.24114/cess.v8i2.44303","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
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.