Breast Cancer Detection and Classification Using Machine Learning Models
TL;DR
Nine ML algorithms are employed for the automatic detection and classification of breast cancer, namely Random Forest, AdaBoost, Gradient Boosting, XGBoost, Logistic Regression, Support Vector Machine, K-Nearest Neighbors, Decision Tree, and Neural Network, and Logistic Regression achieved superior performance across multiple evaluation metrics.
Abstract
Breast Cancer (BC) remains one of the leading causes of mortality among women worldwide. Early detection plays a crucial role in enabling timely diagnosis and effective treatment, thereby significantly improving patient survival rates. However, conventional breast cancer detection techniques are often time-consuming, less accurate, and heavily dependent on human expertise, which increases both operational costs and the likelihood of diagnostic errors. To overcome these limitations, Machine Learning (ML)–based approaches offer a promising alternative by reducing human intervention, lowering costs, accelerating diagnosis, and improving predictive accuracy. In this work, nine ML algorithms are employed for the automatic detection and classification of breast cancer, namely Random Forest (RF), AdaBoost, Gradient Boosting (GB), XGBoost, Logistic Regression (LR), Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Decision Tree (DT), and Neural Network (NN). The experiments are conducted using the publicly available Breast Cancer Wisconsin Dataset (BCWD) obtained from Kaggle. The proposed framework systematically evaluates and compares the performance of these algorithms, while also highlighting their respective strengths and limitations in the context of breast cancer diagnosis. The experimental results demonstrate the effectiveness of ML models in breast cancer detection and classification. Among the evaluated algorithms, Logistic Regression achieved superior performance across multiple evaluation metrics. Specifically, LR achieved an accuracy of 99.12%, precision of 99%, recall of 99%, F1-score of 99%, AUC of 99%, a loss of 0.32%, and an ROC of 1. Performance assessment is conducted using accuracy, precision, recall, F1 Score, loss, AUC, and ROC curves across all models. Furthermore, a comparative analysis of the nine ML algorithms is conducted to validate the robustness of the proposed approach. To assess model generalization and practical applicability, a Streamlit-based web application is also developed, enabling real-time evaluation and reliability testing of the trained models.