Jurnal Komtika (Komputasi dan Informatika)

Articles

Analisis Robustness dan Stabilitas Generalisasi Random Forest dan Support Vector Machine dalam Evaluasi Model Prediktif

Hermansyah , Al - Khaidar , Husni

Abstrak






Classifier performance is commonly reported from a single train-test split, although a different split can yield a different score. This study examines how consistently Random Forest (RF) and Support Vector Machine (SVM) perform under 70:30, 80:20, and 90:10 splits. Two public datasets from the UCI Machine Learning Repository were used: Breast Cancer Wisconsin (Diagnostic), containing 569 breast-mass samples described by 30 cell-nucleus features and labelled benign or malignant, and Optical Recognition of Handwritten Digits, containing 1,797 images of the digits 0–9 at 8×8 pixels. Each ratio was repeated with 30 random seeds using stratified splits, and both models were trained on identical splits. Performance was measured by accuracy, precision, recall, F1, and macro-F1, with variation summarised by the standard deviation, 95% confidence intervals, and the corrected resampled t-test. A fixed reference set that was never used for training separated variation caused by test-set size from model variation. SVM achieved mean accuracies of 97.19–97.35% on Breast Cancer and 97.97–98.28% on Digits, while RF achieved 95.76–96.10% and 97.56–97.89%. Mean accuracy changed by at most 0.33 percentage points across ratios, but the standard deviation at 90:10 was 1.3–2.0 times larger than at 70:30, mainly because of the smaller test set. SVM was more accurate on average, yet the difference was not significant after correction (p = 0.15–0.42). Repeated splitting and corrected tests are therefore needed before claiming that one split ratio or algorithm is superior.







 

Keywords

Random Forest; Support Vector Machine; Data Split Ratio; Classification Accuracy; Evaluation Stability

Referensi

  1. [1] X. Bouthillier et al., “Accounting for variance in machine learning benchmarks,” in Proc. Mach. Learn. Syst. (MLSys), vol. 3, 2021.
  2. [2] G. Varoquaux, “Cross-validation failure: Small sample sizes lead to large error bars,” NeuroImage, vol. 180, pp. 68–77, 2018, doi: 10.1016/j.neuroimage.2017.06.061.
  3. [3] A. Vabalas, E. Gowen, E. Poliakoff, and A. J. Casson, “Machine learning algorithm validation with a limited sample size,” PLoS ONE, vol. 14, no. 11, Art. no. e0224365, 2019, doi: 10.1371/journal.pone.0224365.
  4. [4] S. Bates, T. Hastie, and R. Tibshirani, “Cross-validation: What does it estimate and how well does it do it?,” J. Am. Stat. Assoc., vol. 119, no. 546, pp. 1434–1445, 2024, doi: 10.1080/01621459.2023.2197686.
  5. [5] R. Mardianto, S. Quinevera, and S. Rochimah, “Perbandingan metode Random Forest, Convolutional Neural Network, dan Support Vector Machine untuk klasifikasi jenis mangga,” J. Appl. Comput. Sci. Technol., vol. 5, no. 1, pp. 63–71, 2024, doi: 10.52158/jacost.v5i1.742.
  6. [6] M. D. Purbolaksono, M. I. Tantowi, A. I. Hidayat, and Adiwijaya, “Perbandingan Support Vector Machine dan Modified Balanced Random Forest dalam deteksi pasien penyakit diabetes,” J. RESTI (Rekayasa Sist. Teknol. Inf.), vol. 5, no. 2, pp. 393–399, 2021, doi: 10.29207/resti.v5i2.3008.
  7. [7] R. M. Ali, N. Nurdin, A. Khaidar, M. Azzanna, and A. Rusadi, “Comparative analysis of Random Forest algorithms, artificial neural networks, and logistic regression in breast cancer prediction with machine learning approach,” J. Artif. Intell. Softw. Eng., vol. 5, no. 3, pp. 1285–1295, 2025.
  8. [8] S. Kurnia and A. Khaidar, “Perbandingan metode machine learning menggunakan metode Support Vector Machine dan Artificial Neural Network dalam memprediksi serangan jantung,” J. Inform. Kaputama (JIK), vol. 9, no. 2, pp. 87–94, 2025.
  9. [9] A. Khaidar and S. Kurnia, “Classification of health indicators for diabetes mellitus prediction using a TabTransformer model on clinical tabular data,” J. Comput. Sci. Res. (JoCoSiR), vol. 2, no. 2, pp. 8–15, 2024.
  10. [10] Y. A. Prasetyo, E. Utami, and A. Yaqin, “Pengaruh komposisi split data terhadap performa akurasi analisis sentimen algoritma Naïve Bayes dan SVM,” J. Electr. Eng. Comput. (JEECOM), vol. 6, no. 2, pp. 382–390, 2024, doi: 10.33650/jeecom.v6i2.9188.
  11. [11] Z. Huang and D. Chen, “A breast cancer diagnosis method based on VIM feature selection and hierarchical clustering random forest algorithm,” IEEE Access, vol. 10, pp. 3284–3293, 2022, doi: 10.1109/ACCESS.2021.3139595.
  12. [12] E. A. Algehyne, M. L. Jibril, N. A. Algehainy, O. A. Alamri, and A. K. Alzahrani, “Fuzzy neural network expert system with an improved Gini index random forest-based feature importance measure algorithm for early diagnosis of breast cancer in Saudi Arabia,” Big Data Cogn. Comput., vol. 6, no. 1, Art. no. 13, 2022, doi: 10.3390/bdcc6010013.
  13. [13] A. Rácz, D. Bajusz, and K. Héberger, “Effect of dataset size and train/test split ratios in QSAR/QSPR multiclass classification,” Molecules, vol. 26, no. 4, Art. no. 1111, 2021, doi: 10.3390/molecules26041111.
  14. [14] V. R. Joseph, “Optimal ratio for data splitting,” Stat. Anal. Data Min.: ASA Data Sci. J., vol. 15, no. 4, pp. 531–538, 2022, doi: 10.1002/sam.11583.
  15. [15] L. Breiman, “Random forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32, 2001, doi: 10.1023/A:1010933404324.
  16. [16] C. Cortes and V. Vapnik, “Support-vector networks,” Mach. Learn., vol. 20, no. 3, pp. 273–297, 1995, doi: 10.1007/BF00994018.
  17. [17] M. Fernández-Delgado, E. Cernadas, S. Barro, and D. Amorim, “Do we need hundreds of classifiers to solve real world classification problems?,” J. Mach. Learn. Res., vol. 15, pp. 3133–3181, 2014.
  18. [18] T. G. Dietterich, “Approximate statistical tests for comparing supervised classification learning algorithms,” Neural Comput., vol. 10, no. 7, pp. 1895–1923, 1998, doi: 10.1162/089976698300017197.
  19. [19] C. Nadeau and Y. Bengio, “Inference for the generalization error,” Mach. Learn., vol. 52, no. 3, pp. 239–281, 2003, doi: 10.1023/A:1024068626366.
  20. [20] F. Pedregosa et al., “Scikit-learn: Machine learning in Python,” J. Mach. Learn. Res., vol. 12, pp. 2825–2830, 2011.
  21. [21] W. Wolberg, O. Mangasarian, N. Street, and W. Street, “Breast Cancer Wisconsin (Diagnostic),” UCI Machine Learning Repository, 1995, doi: 10.24432/C5DW2B.
  22. [22] E. Alpaydin and C. Kaynak, “Optical Recognition of Handwritten Digits,” UCI Machine Learning Repository, 1998, doi: 10.24432/C50P49.
  23. [23] S. Kapoor and A. Narayanan, “Leakage and the reproducibility crisis in machine-learning-based science,” Patterns, vol. 4, no. 9, Art. no. 100804, 2023, doi: 10.1016/j.patter.2023.100804.