Heart disease is one of the leading causes of death worldwide and requires early detection to reduce the risk of fatality. This study aims to analyze and compare the performance of three machine learning algorithms, namely Support Vector Machine (SVM), Random Forest, and XGBoost, in heart disease classification. The dataset was obtained from the Kaggle platform and consists of variables such as BMI, smoking habits, physical activity, general health conditions, and other health-related attributes, with HeartDisease as the target variable. The research stages include data preprocessing, categorical data encoding, data normalization, and data splitting using the 80:20 train-test split method. The results show that SVM and XGBoost achieved an accuracy of 0.90, while Random Forest achieved 0.89. Based on other evaluation metrics, XGBoost demonstrated the best performance with a precision of 0.88, recall of 0.90, and F1-score of 0.88. Feature importance analysis also revealed that several health factors significantly influence the risk of heart disease. The contribution of this study lies in comparing the performance of machine learning algorithms for heart disease classification and identifying influential health factors related to heart disease risk. The findings are expected to serve as a reference for developing decision support systems to assist early heart disease detection more accurately and efficiently.
Copyrights © 2026