BackgroundTo construct two prognostic models to predict survival in breast cancer patients; to compare the efficacy of the two models in the whole group and the advanced human epidermal growth factor receptor-2-positive (HER2+) subgroup of patients; to conclude whether the Hybrid Bayesian Network (HBN) model outperformed the logistics regression (LR) model.MethodsIn this paper, breast cancer patient data were collected from the SEER database. Data processing and analysis were performed using Rstudio 4.2.0, including data preprocessing, model construction and validation. The L_DVBN algorithm in Julia0.4.7 and bnlearn package in R was used to build and evaluate the HBN model. Data with a diagnosis time of 2018(n = 23,384) were distributed randomly as training and testing sets in the ratio of 7:3 using the leave-out method for model construction and internal validation. External validation of the model was done using the dataset of 2019(n = 8128). Finally, the late HER2 + patients(n = 395) was selected for subgroup analysis. Accuracy, calibration and net benefit of clinical decision making were evaluated for both models.ResultsThe HBN model showed that seventeen variables were associated with survival outcome, including age, tumor size, site, histologic type, radiotherapy, surgery, chemotherapy, distant metastasis, subtype, clinical stage, ER receptor, PR receptor, clinical grade, race, marital status, tumor laterality, and lymph node. The AUCs for the internal validation of the LR and HBN models were 0.831 and 0.900; The AUCs for the external validation of the LR and HBN models on the whole population were 0.786 and 0.871; the AUCs for the external validation of the two models on the subgroup population were 0.601 and 0.813.ConclusionThe accuracy, net clinical benefit, and calibration of the HBN model were better than LR model. The predictive efficacy of both models decreased and the difference was greater in advanced HER2 + patients, which means the HBN model had higher robustness and more stable predictive performance in the subgroup.