Evaluasi Performa Random Forest Dengan Penyesuaian Threshold Klasifikasi Pada Prediksi Penyakit Jantung - Lidya Shafadhila; Andreas Perdana (Fakultas Teknik Universitas Hamzanwadi, 2026)
Heart disease remains one of the leading causes of death worldwide, necessitating an accurate prediction system to support early detection. This study aims to evaluate the performance of the Random Forest algorithm in predicting heart disease through the application of a threshold adjustment method. This research implements a Youden Index-based threshold adjustment, tested on the Statlog and Cleveland datasets, to assess the consistency of model performance across different data characteristics that share similar features. This method is utilized to determine the optimal threshold to achieve the best balance between recall and specificity. Additionally, the study analyzes the impact of threshold variations on accuracy, recall, specificity, and F1-score metrics to minimize false-negative errors and enhance the clinical relevance of the prediction results. Testing was conducted using the Cleveland Heart Disease Dataset and the Statlog Heart Disease Dataset with stratified sampling techniques. The results demonstrate that threshold adjustment significantly improves classification performance. The Cleveland dataset yielded an accuracy of 0.867, a recall of 0.893, and a Youden Index of 0.737 at an optimal threshold of 4.0, while the Statlog dataset achieved an accuracy of 0.833, a recall of 0.833, and a Youden Index of 0.667 at a threshold of 5.0. Overall, the combination of Random Forest and threshold adjustment proven to be effective in improving the quality of heart disease predictions.