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

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
Crossref
6
Scopus
10
Crossref Logo
Fatemeh Bashardoustjoubjarkouli, Mehdi Adda (2024)
Interactive Machine Learning Pedagogy: Developing a Web-Based Educational Platform for Clinical Predictive Modeling. Procedia Computer Science, 251, 382.
Crossref Logo
Anthony M. Nwohiri, Adeyemi A. Laguda, Abidemi A. Olanite, Damilare D. Olabamire (2024)
LOGISTIC REGRESSION TECHNIQUE FOR CARDIOVASCULAR DISEASE PREDICTION. FUDMA JOURNAL OF SCIENCES, 8(4), 266.
Crossref Logo
Kanak Kalita, Narayanan Ganesh, Sambandam Jayalakshmi, Jasgurpreet Singh Chohan, Saurav Mallik, Hong Qin (2023)
Multi-Objective artificial bee colony optimized hybrid deep belief network and XGBoost algorithm for heart disease prediction. Frontiers in Digital Health, 5.
Scopus Logo
Sunardi (2024-12-01)
Smart Harvest: Web-Integrated Ripeness Detection for Apples with CNN Algorithm. Ingenierie Des Systemes D Information, 29(6), 2181-2190.
Scopus Logo
Andrade-Arenas L. (2024-09-01)
Chatbot with ChatGPT technology for mental wellbeing and emotional management. Iaes International Journal of Artificial Intelligence, 13(3), 2635-2644.
Scopus Logo
Supriyanti W. (2024-01-01)
Optimizing Cervical Cancer Diagnosis with Correlation-Based Feature Selection: A Comparative Study of Machine Learning Models. International Journal of Advanced Computer Science and Applications, 15(12), 698-707.
Scopus Logo
Rochman E.M.S. (2023-08-01)
Utilizing LSTM and K-NN for Anatomical Localization of Tuberculosis: A Solution for Incomplete Data. Mathematical Modelling of Engineering Problems, 10(4), 1114-1124.
Scopus Logo
Saikhu A. (2023-01-01)
Response Time Prediction of M/M/1SRPT Queuing System Using Simulation Modeling and Artificial Intelligence. 2023 8th International Conference on Informatics and Computing Icic 2023.
Scopus Logo
Bagastio K. (2023-01-01)
Development of stock price prediction system using Flask framework and LSTM algorithm. Journal of Infrastructure Policy and Development, 7(3).
Scopus Logo
Cynthia E.P. (2023-01-01)
Improved Machine Learning Algorithm for Heart Disease Prediction Based on Hyperparameter Tuning. 5th IEEE International Conference on Artificial Intelligence in Engineering and Technology Iicaiet 2023, 176-181.
Scopus Logo
Cahyani D.E. (2022-01-01)
Development of Website for COVID-19 Detection on Chest X-Ray Images. 2022 5th International Seminar on Research of Information Technology and Intelligent Systems Isriti 2022, 330-333.

Similar Articles

1-10 of 519

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