Implementation of K-Nearest Neighbors Algorithm for Predicting Heart Disease Using Python Flask

Authors

  • Dimas Aryo Anggoro Informatics Department, Universitas Muhammadiyah Surakarta, Indonesia
  • Nur Chudlori Aziz Informatics Department, Universitas Muhammadiyah Surakarta, Indonesia

DOI:

https://doi.org/10.24996/ijs.2021.62.9.33

Keywords:

Heart Disease, Machine Learning, K-Nearest Neighbors, Flask, Python

Abstract

     Heart disease is a non-communicable disease and the number 1 cause of death in Indonesia. According to WHO predictions, heart disease will cause 11 million deaths in 2020. Bad lifestyle and unhealthy consumption patterns of modern society are the causes of this disease experienced by many people. Lack of knowledge about heart conditions and the potential dangers cause heart disease attacks before any preventive measures are taken. This study aims to produce a system for Predicting Heart Disease, which benefits to prevent and reduce the number of deaths caused by heart disease. The use of technology in the health sector has been widely practiced in various places and one of the advanced technologies is machine learning. Machine learning technology can be used to predict the potential patients of heart disease by implementing the K-Nearest Neighbors (KNN). The algorithm results in 65.93% for its accuracy, which is then improved to 82.41% due to the z-score normalization. It shows that z-score can noticeably improve the accuracy of the KNN algorithm. The system is developed based on a website that uses the Flask micro-framework so that development is more efficient. Flask is a micro-framework based on the Python programming language that does not contain many tools and libraries, so it is more portable and does not utilize a lot of resources.

Downloads

Download data is not yet available.

Downloads

Published

2021-09-30

Issue

Section

Computer Science

How to Cite

Implementation of K-Nearest Neighbors Algorithm for Predicting Heart Disease Using Python Flask. (2021). Iraqi Journal of Science, 62(9), 3196-3219. https://doi.org/10.24996/ijs.2021.62.9.33

Similar Articles

21-30 of 453

You may also start an advanced similarity search for this article.