Hybrid Method Optimization For Classifying Heart Disease Using Knn And Pca Algorithms Based On Web Streamlite
Keywords:
Heart disease, KNN, PCA, classification, StreamlitAbstract
Heart disease is one of the leading causes of death worldwide and often goes undetected early. This necessitates a decision support system capable of facilitating rapid and accurate diagnosis. This study aims to develop a heart disease classification system by combining two methods: K-Nearest Neighbors (KNN) and Principal Component Analysis (PCA), in a web-based application using Streamlit. PCA is used to reduce data dimensionality and eliminate less relevant features to improve classification efficiency and performance. Meanwhile, the KNN algorithm is used to determine the class (heart disease or not) based on the proximity of the new data to the labeled data. This study used the heart.csv dataset and was tested using several methods, including accuracy, classification reports, and confusion matrices. The test results showed that the hybrid PCA and KNN model was capable of providing relatively high accuracy and informative visualizations. The best accuracy rate achieved in this study reached 90%, demonstrating the model's effectiveness in classifying data. Using the Streamlit interface, this system is easily accessible and usable by users without requiring special installation. The conclusion of this study is that the combination of PCA and KNN is effective in classifying heart disease efficiently and accurately.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2026 Khofiyatul, Moh Ainol Yaqin , Cahyuni Novia (Author)

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.









