Machine learning prediction of histological types of breast cancer: a case study in Morocco

Fatima Ezahra Mouas, Latifa Doudach, Achraf Benba, Youssef Bakri, Nasri Issad, Abderrahim Ammar, Hanae Terchoune, Yahia Cherrah, Khan Wen Goh, Abdelhakim Bouyahya, Taoufiq Fechtali · Intelligence-Based Medicine · 2025

Breast cancer remains a major global public health issue, especially among women, as the leading cause of cancer-related death. This study evaluated nine machine learning algorithms including Random Forest, support vector machines with RBF , linear, and polynomial kernels, K-Nearest Neighbors, logistic regression, AdaBoost, XGBoost, and a stacking classifier to predict histological types of breast cancer. The stacking classifier achieved the highest accuracy of 99.1 percent, followed by Random Forest at 98.3 percent and SVM with RBF kernel at 97.68 percent. XGBoost reached 97.4 percent accuracy, while K-Nearest Neighbors and SVM with polynomial kernel showed accuracies of 90.7 and 88.1 percent respectively. AdaBoost obtained 83.6 percent, with SVM linear and logistic regression performing lowest at 56.8 and 53.9 percent respectively. Hyperparameter optimization with Optuna improved Random Forest accuracy from 96.94 percent to 98.3 percent. Using RandomOverSampler to balance classes increased recall for the minority class from 92 percent to 98 percent, improving sensitivity to rare cases. The studied cohort had a mean age of 51 years, with 71.6 percent diagnosed with invasive ductal carcinoma. The average tumor size was 3.3 cm, and 11.81 percent of cases were of the triple negative breast cancer type. Postmenopausal women represented 46.24 percent of the sample. Spearman correlation analysis showed positive links between age, menopause, and the presence of invasive ductal carcinoma. Feature importance analysis using Random Forest identified age, menopause, city, and marital status as the main predictive factors. To facilitate clinical application, integration of the model into electronic health records is proposed, allowing automated data entry, real time predictions with confidence levels, and a clinician validation interface that ensures continuous model improvement and secure support for diagnosis.

Read the paper · More papers on PaperTik