As illustrated in Fig. 6, the selected RF model for HER2-over-expression vs. others, the LR model for HER2-low-expression vs. others, and the KNN model for HER2-zero-expression vs. others based on the internal institution, also exhibited predictive performance for BC patients from the external institution with an AUC of 0.788 (95%CI: 0.708–0.868), 0.779 (95%CI: 0.698–0.860), 0.835 (95%CI: 0.762–0.908), respectively. The gene discussed is ERBB2; the disease is breast cancer.