Analisis Perbandingan Model Machine Learning menggunakan Teknik Stratified K-Fold Cross Validation untuk Klasifikasi Penyakit Jantung - Avrilyan Putra Bintang Pratama; Wahyu Aji Eko Prabowo (Universitas Budi Darma, 2026)
Heart disease is one of the leading causes of death worldwide. Conventional approaches still have limitations, such as subjectivity in interpretation and relatively long analysis times. Therefore, this study proposes using machine learning to improve the accuracy of heart disease risk prediction by comparing the performance of Random Forest, Support Vector Machine (SVM), and K-Nearest Neighbor (KNN) algorithms. The research methodology includes data preprocessing, splitting the dataset into training and testing sets, and hyperparameter optimization using Stratified K-Fold Cross Validation with variations of K = 5, 10, 15, and 20. Model evaluation is conducted using accuracy, precision, recall, F1-score, and ROC-AUC metrics to comprehensively and objectively measure classification performance. The results show that the Random Forest algorithm achieves the best performance. At the optimal configuration of K = 15, the model attains an accuracy of 93.17%, a precision of 0.92, a recall of 0.95, an F1-score of 0.94, and an ROC-AUC of 0.97. In addition, this model minimizes classification errors, particularly False Negatives, making it more effective at identifying at-risk patients. The main contribution of this study is demonstrating that the combination of Random Forest and Stratified K-Fold Cross Validation can significantly improve classification performance and produce a model that is accurate, stable, and reliable for implementation in medical decision support systems.