Breast tumor classification into benign and malignant categories is an important challenge in the medical field because diagnostic errors can lead to delayed treatment or unnecessary medical procedures. This study aims to analyze the performance of Random Forest and evaluate the effects of feature selection and GridSearchCV hyperparameter optimization on breast tumor classification. The study used the Wisconsin Breast Cancer Diagnostic Dataset, consisting of 569 samples with 30 numerical features extracted from Fine Needle Aspiration (FNA) examinations. Four sequential Random Forest model configurations were compared: baseline Random Forest, Random Forest with feature selection, Random Forest with GridSearchCV optimization, and the integration of feature selection with GridSearchCV. Feature selection was performed using feature importance scores with ROC-AUC-based cross-validation to determine the optimal feature subset. Model evaluation was conducted using accuracy, precision, recall, F1-score, ROC-AUC, confusion matrix, and train-test gap. The results showed that all models achieved the same accuracy of 97.37%, precision of 1.0000, recall of 0.9286, and F1-score of 0.9630. However, the integrated model achieved the highest ROC-AUC of 0.9977 with the smallest train-test gap of 0.0241 while reducing the number of features from 30 to 15. These findings indicate that integrating feature selection and GridSearchCV improves model stability, efficiency, and discriminative capability without reducing classification performance, addressing the limitation of prior studies that applied these techniques separately.
Copyrights © 2026