This study analyzes the performance of Random Forest and Logistic Regression algorithms in detecting breast cancer using datasets from Kaggle. Evaluation was done based on metrics such as accuracy, precision, recall, and F1-score to classify benign and malignant cancers. Logistic Regression recorded 98% accuracy, with 99% precision for benign class and 98% for malignant class, and 99% recall for both classes. Meanwhile, Random Forest showed an accuracy of 96%, a precision of 96% for benign class and 98% for malignant class, and a recall of 99% for benign class and 93% for malignant class. This study contributes by highlighting the superiority of Logistic Regression in producing more accurate and consistent results on simple datasets, while Random Forest shows greater potential in handling data with more complex patterns. Different from previous studies, this research emphasizes the importance of matching dataset characteristics with the selected algorithm to improve the accuracy of early breast cancer detection. These results are expected to support evidence-based decision-making in the clinical field, especially in choosing the algorithm that best suits the needs and resource constraints.
Copyrights © 2025