Bulletin of Computer Science Research
Vol. 6 No. 4 (2026): June 2026

Perbandingan Grid Search dan Random Search untuk Optimasi Hyperparameter Random Forest pada Klasifikasi Kanker Payudara

Fiona Yenisya Dewi (STMIK Widya Utama, Purwokerto)
Bayu Rizkya Pratama (STMIK Widya Utama, Purwokerto)
Sunaryono Sunaryono (STMIK Widya Utama, Purwokerto)



Article Info

Publish Date
30 Jun 2026

Abstract

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.

Copyrights © 2026






Journal Info

Abbrev

bulletincsr

Publisher

Subject

Computer Science & IT

Description

Bulletin of Computer Science Research covers the whole spectrum of Computer Science, which includes, but is not limited to : • Artificial Immune Systems, Ant Colonies, and Swarm Intelligence • Bayesian Networks and Probabilistic Reasoning • Biologically Inspired Intelligence • Brain-Computer ...