Perbandingan Grid Search dan Random Search untuk Optimasi Hyperparameter Random Forest pada Klasifikasi Kanker Payudara - Fiona Yenisya Dewi; Bayu Rizkya Pratama; Sunaryono Sunaryono (Bulletin of Computer Science Research, 2026)
Breast cancer is the most prevalent type of cancer in Indonesia, with 71% of patients diagnosed at advanced stages due to limited access to early detection. This condition necessitates the development of machine learning-based screening systems that are not only accurate but also computationally efficient to enable widespread implementation in healthcare facilities with limited resources, making the selection of an efficient hyperparameter optimization method crucial. This study compares two hyperparameter optimization methods, namely Grid Search  and Random Search, applied to the Random Forest algorithm using the UCI Wisconsin Diagnostic Breast Cancer Dataset (569 samples, 30 numerical features) with an identical search space encompassing 288 hyperparameter combinations and stratified 5-fold cross-validation. Experimental results demonstrate that Random Search RF achieves performance equivalent to Baseline RF on threshold-based metrics (accuracy 0.9737; F1-Score 0.9630) while producing the highest AUC-ROC of 0.9950 in 88,26 seconds. In contrast, Grid Search  RF yields performance below the baseline (accuracy 0.9561; F1-Score 0.9367) with a computation time of 526,73 seconds, attributable to the optimizer's curse phenomenon in which the selected combination based on cross-validation does not produce optimal generalization on the test data. Random Search is proven to be 5.97 times more efficient than Grid Search  with superior solution quality, empirically confirming the theoretical proposition that Random Search is capable of finding competitive configurations at substantially lower computational cost compared to exhaustive search in high-dimensional hyperparameter spaces.