Machine Learning Modeling of Hospital Length of Stay After Breast Cancer Surgery: Comparison of Random Forest and Linear Regression Approaches
<i>Background and Objectives</i>: Hospital length of stay (LOS) after breast cancer surgery is a key indicator of postoperative recovery, healthcare quality, and hospital resource utilization. Traditional statistical approaches have identified general correlates of LOS but remain limited in predictive accuracy, particularly in heterogeneous real-world surgical populations. Machine learning (ML) models may offer improved performance by capturing nonlinear interactions among clinical, pathological, and operative factors. This study aimed to evaluate ML algorithms for LOS prediction and to identify determinants of prolonged hospitalization in a contemporary breast cancer cohort. <i>Materials and Methods</i>: We conducted a retrospective cross-sectional study of 198 consecutive breast cancer patients who underwent surgery between January 2022 and December 2023 at a single tertiary care center. Clinical, pathological, and surgical data were extracted from electronic medical records. Three regression models-multiple linear regression, Random Forest, and Gradient Boosting-were trained to predict continuous LOS, and three classification models were applied to prolonged LOS (≥10 days). Model performance was assessed using mean absolute error (MAE), root mean square error (RMSE), coefficient of determination (R<sup>2</sup>), and area under the curve (AUC). Feature importance was analyzed for the best-performing model. <i>Results</i>: The median LOS was 7 days (IQR 5-10), ranging from 1 to 26 days. Breast-conserving surgery showed the shortest LOS (median 3 days), while mastectomy with immediate reconstruction resulted in the longest stays (median 8 days). Random Forest regression achieved the lowest prediction error (MAE 2.31 days; RMSE 2.82; R<sup>2</sup> = 0.37), outperforming Gradient Boosting and substantially surpassing linear regression (MAE 8.63 days; R<sup>2</sup> = -8.17). Key predictors included age, surgical complexity, reconstruction modality, BMI, implant capacity, and tumor burden. Classification models yielded modest AUCs (0.545-0.589) with low sensitivity, indicating limited discriminative performance for dichotomized LOS outcomes. <i>Conclusions</i>: Machine-learning models, particularly Random Forest, substantially improve LOS prediction compared with classical regression and provide clinically meaningful insights into the drivers of hospitalization after breast cancer surgery. Continuous LOS modeling is more informative than binary thresholds. These findings support integrating ML-based tools into perioperative planning, resource allocation, and patient counseling in breast surgical care.
Authors
- Cristina Orlov Slavu
- Iulian Slavu
- Daniela-Elena Gheoca Mutu
- Ileana Dima
- Alexandru Dogaru
- Raluca Tulin
- Adrian Tulin
Institutions
- Carol Davila University of Medicine and Pharmacy (RO)
- Clinical Emergency Hospital Bucharest (RO)
Publication Details
- Journal
- Medicina
- Published
- 2025-12-31
- DOI
- https://doi.org/10.3390/medicina62010088
- Primary Topic
- Breast Cancer Treatment Studies
- Type
- article
- Field-Weighted Citation Impact
- 0.00