Heart disease is one of the leading causes of death worldwide, highlighting the need for accurate predictive methods to support early detection. This study aims to analyze and compare the performance of Decision Tree, Naïve Bayes, K-Nearest Neighbor (KNN), and Random Forest algorithms for heart disease prediction using the UCI Heart Disease Dataset. A quantitative experimental approach was employed using 920 patient records with 16 attributes. Data preprocessing included removing irrelevant attributes, handling missing values using median and mode imputation, applying One-Hot Encoding to categorical variables, standardizing numerical variables using StandardScaler, and transforming the target variable into binary classes. The dataset was divided into 80% training data and 20% testing data. The four classification models were evaluated using Accuracy, Precision, Recall, and F1-Score. The results showed that Naïve Bayes achieved the best performance, with an Accuracy of 86.96%, Precision of 87.50%, Recall of 89.22%, and F1-Score of 88.35%, outperforming the other algorithms. These findings indicate that Naïve Bayes is effective for heart disease classification and has potential as a predictive model to support early detection.
Copyrights © 2026