Comparative Evaluation of Support Vector Classifier, Random Forest, and XGBoost for Early Breast Cancer Prediction With Feature Importance and Class Balancing

Deepti Sharda, Ritika Bansal, Prachi Gumber, Swati Kandari, Indu Arora · Cureus Journal of Computer Science. · 2025

Timely detection of breast cancer is crucial for improving patient outcomes. While machine learning (ML) models have shown promise in supporting diagnosis, there is still a need for frameworks that combine predictive accuracy with model interpretability and balanced evaluation. This study compares three widely used supervised ML algorithms, Support Vector Classifier (SVC), Random Forest, and XGBoost, using the Wisconsin Diagnostic Breast Cancer dataset. To address class imbalance, the dataset was balanced using the Synthetic Minority Oversampling Technique, and hyperparameter tuning was also performed through GridSearchCV. Each model was evaluated using accuracy, precision, recall, F1-score, and receiver operating characteristic area under the curve. XGBoost exhibited the best results, achieving 98.60% accuracy and perfect recall for malignant cases, which are crucial for reducing false negatives in clinical settings. Random Forest also demonstrated better results, while SVC showed slightly lower accuracy, but it still maintained balanced class-wise performance. Feature importance analysis was applied to these models to enhance clarity and highlight key diagnostic features. SVC could not generate feature importance output due to its kernel-based approach. This study presents a reproducible and interpretable ML-based framework for breast cancer classification. By integrating model optimization, class balancing, and explainability, the proposed approach provides a robust foundation for future clinical decision-support systems.

Read the paper · More papers on PaperTik