Frontiers in Psychology

Development and evaluation of an explainable machine learning-based prediction model for workplace bullying among clinical nurses

Meiyun Jia, Ke Song, Baojiang Zhang, Hui Xu, Yujie Zhao, Huiyuan Xue

Computational

Key points

From the paper's conclusion
  • Conclusion The XGBoost model showed acceptable discrimination and calibration; its risk estimates may help nurse managers identify clinical nurses at high risk of workplace bullying.

Abstract

Background Workplace bullying harms nurses’ physical and mental health and may compromise care quality and patient safety. Previous studies have investigated its associated factors mainly with traditional statistical methods. However, such models are limited in identifying risk at the individual level, whereas machine learning offers a new way to identify nurses at risk of workplace bullying. Objective This study aimed to develop prediction models for workplace bullying among clinical nurses using seven machine-learning algorithms, compare their performance to identify the best-performing model, and combine Shapley Additive Explanations (SHAP) with Shiny to visualize the optimal model. Methods Between August and September 2025, clinical nurses were recruited by convenience sampling from three tertiary general hospitals in central China and completed the Negative Acts Questionnaire-Revised online. Participants were randomly allocated to training and validation sets at a 7:3 ratio. Variables were selected by univariate analysis, LASSO regression and the Boruta algorithm (R 4.4.2). Seven models were developed in Python 3.10: logistic regression (LR), decision tree (DT), random forest (RF), support vector machine (SVM), extreme gradient boosting (XGBoost), Light Gradient Boosting Machine (LightGBM), and K-nearest neighbors (KNN). Performance was compared by the area under the curve (AUC), sensitivity, specificity, calibration and decision curve analysis. The best-performing model was interpreted with SHAP and displayed through a Shiny interface. Results Workplace bullying was reported by 286 nurses (27.98%), and seven predictors were retained: weekly working hours, emotional exhaustion, working years, technical title, position, departmental atmosphere and daily workload. AUC ranged from 0.798 to 0.889 in the training set and from 0.775 to 0.887 in the validation set. XGBoost showed relatively stable discrimination across the two sets (0.889 and 0.865) together with favorable sensitivity, specificity and calibration, and was selected as the final model. Furthermore, SHAP analysis indicated that emotional exhaustion, departmental atmosphere, daily workload and weekly working hours contributed most to its predictions. Conclusion The XGBoost model showed acceptable discrimination and calibration; its risk estimates may help nurse managers identify clinical nurses at high risk of workplace bullying. Meanwhile, nurse managers should pay attention to clinical nurses at high risk and provide targeted support accordingly.

Read the paper

Discussion

Science Skim's AI key points, plus readers' public thoughts

Readers' thoughts

No reader thoughts yet.

Related papers