Optimizing breast cancer prediction through stacking ensemble machine learning models: a comparative analysis
摘要
To develop and identify an optimal stacking ensemble model for predicting breast cancer, using combinations of Support Vector Machines (SVM), Naïve Bayes, and K-Nearest Neighbours (KNN) as base models with a rotating meta-classifier.
MethodAn open-source breast cancer dataset of 569 patients (357 benign, 212 malignant) from UCI Machine Learning Repository was analysed. Ten predictive cell nucleus features were selected, and all other irrelevant variables were excluded. Exploratory Data Analysis included detection of outliers (addressed via Winsorization), assessment of normality (square root transformation applied), and correlation analysis to identify multicollinearity. Independent sample t-tests evaluated differences in features by diagnosis. Multicollinear features were assessed using Binary Logistic Regression, retaining the features with the highest Pseudo for modelling. Three stacking models were constructed using combinations of SVM, Naïve Bayes, KNN as base and meta-classifiers. Models were evaluated using 10-fold cross-validation with performance metrics including accuracy, precision, recall, F1-score, and ROC AUC. All analyses were conducted using Python and R.
ResultsSignificant differences were found between malignant and benign cases for all features (p < 0.001), except for fractal dimension (p = 0.98), which was then excluded from the analysis. Multicollinearity was observed among five features, and “area” was retained for modelling as it demonstrated the strongest predictive power for diagnosis, with a Pseudo
The stacking ensemble model, integrating SVM, Naïve Bayes, and KNN, achieved improved accuracy and robustness in breast cancer prediction with Model 2 performing the best. This approach demonstrates potential for enhancing early detection and reducing breast cancer mortality. Its application in broader clinical and diverse healthcare settings may further advance disease prediction efforts.