Application of the Random Forest Algorithm for Breast Cancer Analysis with Data Balancing: Case Study at Al-Ihsan Hospital

Risma Intan Wulandari, Riska Yanu Fa’rifah, Nur Ichsan Utama · 2024

This study explores the application of the Random Forest Algorithm for predicting breast cancer using patient medical records from Al-Ihsan Hospital, West Java Province, during 2020–2023. The research addresses the challenges posed by imbalanced data by utilizing the Synthetic Minority Over-sampling Technique (SMOTE) to enhance the prediction accuracy of breast cancer cases. The data, categorized into “ca mammae” and “ca mammae + associate,” were split into training and testing sets with proportions of 90:10 to comprehensively evaluate the model's performance. Breast cancer, a leading type of cancer affecting millions globally, necessitates effective early detection techniques to significantly improve patient outcomes. This research underscores the importance of leveraging machine learning algorithms, like Random Forest, to analyze complex and non-linear relationships within medical data for improved diagnostic predictions. The Random Forest algorithm, known for its high accuracy, noise handling, speed, and overfitting control, was selected for its suitability in analyzing the imbalanced dataset of breast cancer records. The findings revealed that the Random Forest model, combined with SMOTE for data balancing, achieved an accuracy of 89%, as indicated by the confusion matrix and classification report. Cross Validation was employed to validate the model's performance, yielding an average accuracy of 90,35% with a standard deviation of 3%. This highlights the model's precision and recall capabilities in predicting breast cancer from the test data. This research contributes to the field by demonstrating the effectiveness of integrating data mining techniques, specifically the Random Forest algorithm and SMOTE, in enhancing the classification performance for early detection and treatment of breast cancer.

Read the paper · More papers on PaperTik