Skip to main content
BMC Nursing logoLink to BMC Nursing
. 2026 Apr 11;25:448. doi: 10.1186/s12912-026-04611-1

Development of ICU nurses’ compassion fatigue classification model: an explainable machine learning algorithm

Xueling Bian 1,2,#, Shunlian Luan 1,#, Huanhuan Wu 1, Dandan Zhang 1, Ping Gao 2, Xiaolin Chen 3,✉
PMCID: PMC13177887  PMID: 41965664

Abstract

Background

Compassion fatigue (CF) is a common phenomenon among nurses working in intensive care units (ICU). Their prolonged exposure to the suffering and trauma of critical patients can lead to emotional exhaustion and psychological stress.

Aim

To develop a classification model for compassion fatigue among intensive care unit nurses using multiple machine learning algorithms and identify the key factors.

Methods

A multicenter cross-sectional study was utilized and collected valid questionnaire data from 1110 intensive care unit nurses from 25 tertiary hospitals. The dataset was randomly split into a training set (70%) and a test set (30%). The variables were evaluated using the Boruta algorithm and the LASSO regression. Four classification models—Logistic Regression (LR), Extreme Gradient Boosting (XGBoost), Support Vector Machine (SVM), and Light Gradient Boosting Machine (LGBM)—were developed. The optimal model was selected using the area under the curve (AUC) of the receiver operating characteristics, accuracy, precision, recall, F1 score, and Brier score. Shapley additive explanations (SHAP) were employed to visualize the significance of each variable of the optimal model.

Results

The prevalence of compassion fatigue among intensive care unit nurses was 78.2%. XGBoost exhibited the best performance over the other models (AUC = 0.832, 95% CI: 0.779–0.885, accuracy = 0.733, precision = 0.932, recall = 0.718, F1 = 0.811, Brier score = 0.116). According to SHAP values in the XGBoost model, the most important variables were psychological resilience, perceived social support, practice environment, income satisfaction, educational level, physical condition, and nursing career re-choice intention.

Conclusion

The classification model for compassion fatigue of intensive care unit nurses constructed by XGBoost exhibited the best performance. SHAP explained the key variables. These findings provide novel insights for optimizing intervention strategies for nursing managers.

Clinical trial number

Not applicable.

Supplementary Information

The online version contains supplementary material available at 10.1186/s12912-026-04611-1.

Keywords: Compassion fatigue, Intensive care unit, Nurses, Machine learning, SHAP

Introduction

Compassion fatigue (CF) refers to a condition characterized by physical and mental exhaustion and emotional depletion resulting from prolonged exposure to the traumatic experiences and suffering of others [1]. It occurs when excessive empathy generates significant stress. Nurses are at high risk of CF due to their long-term exposure to patients’ painful experiences.The intensive care unit (ICU)—a specialized department dedicated to the treatment of critically ill patients and the diagnosis and management of complex diseases—reflects a hospital’s overall emergency response capacity and clinical service quality [2]. It requires nurses to have outstanding technical proficiency and advanced cognitive and emotional skills [3]. Therefore, ICU nurses experience higher levels of CF compared to general ward nurses [4].

CF is a widespread occupational health issue in the healthcare sector, with ICU nurses consistently identified as a particularly high-risk group across healthcare systems globally [5, 6]. Existing research indicates that CF contributes to occupational burnout in 80% of affected nurses, anxiety and depression in 21%, and sleep disorders in 16.7%, severely jeopardizing their physical and mental health [7–9]. This results in reduced work efficiency and an increased occurrence of medical errors and adverse events, significantly compromising the quality of nursing care. Furthermore, CF is a major barrier to achieving high-quality nursing services. Consequently, the prompt identification of ICU nurses susceptible to CF and the implementation of interventions to mitigate symptom exacerbation are crucial.

Previous studies have predominantly utilized individual methodologies to investigate related variables and determinants of nurses’ CF, resulting in a deficiency of systematic and precise classification models. Although several CF scales have been developed for clinical nurses, these scales primarily identify nurses who are already experiencing CF. The evaluation process is largely subjective, limiting its capacity to identify nurses at high risk of developing CF. Moreover, traditional models, predominantly based on linear regression, assume a linear relationship between variables and outcome variables [10]. This approach has limitations in handling non-linear relationships and complex interaction effects. Machine learning (ML) algorithms, with their robust capacity for multidimensional data mining and analysis, excel at screening key factors from data and identifying underlying patterns [11]. Consequently, ML models have demonstrated superior analytical ability compared to traditional methods [12]. It has been extensively utilized in clinical settings for disease diagnosis, prognosis, and nursing decision support [13].

In constructing ML models for classification, understanding the model’s decision-making process is essential for ensuring its reliability and explainability. The Shapley additive explanations (SHAP) model explainability analysis provides a technique for acquiring deep insights into ML models [12]. SHAP analysis offers a clear understanding of each feature’s impact on the model’s output, presenting a hierarchy of feature importance through SHAP values, which quantify each feature’s contribution. Simultaneously, SHAP visualizations demonstrate the impact of different feature values on the model, thereby aiding comprehension of how variations in feature values affect the outcome.

Consequently, the primary aim of this study is to develop an explainable model for CF among ICU nurses utilizing four ML algorithms: Logistic Regression (LR), Extreme Gradient Boosting (XGBoost), Support Vector Machine (SVM), and Light Gradient Boosting Machine (LGBM). The goal of This study is to inform the development of prevention and intervention strategies for CF by nursing managers.

Methods

Design and participants

This is a multicenter cross-sectional study. A convenience sampling strategy was employed to enroll ICU nurses from 25 tertiary hospitals in Shandong Province, Hebei Province, and Beijing for the survey conducted in China. Data were collected between November 2024 and April 2025. The inclusion criteria included (1) certified registered nurses, (2) nurses who worked full time and had at least one year of clinical nursing experience in the ICU, and (3) nurses who provided informed consent and volunteered to participate in this study. The exclusion criteria included (1) nurses who are on internship, training, or rotation in the ICU and (2) nurses who are not on duty due to sick leave, maternity leave, or further education during this study.

Sample Size

Based on previous studies, the calculation formula for the sample size of the binary classification outcome model:Inline graphic, was utilized to perform sample size calculations [14]. Considering the estimated prevalence of CF P at 70% among ICU nurses, an absolute margin of error, δ of 0.03, and a 10% invalid sample rate, a minimum of 994 samples were needed. This study included 1169 ICU registered nurses. However, 27 regular response questionnaires (2.3%) and 32 short completion times (2.7%) were excluded, representing an effective response rate of 95.0%.

Variables

Variable selection was guided by evidence that CF stems from the interplay of individual, psychosocial and organi-sational factors. These variables were self-designed by the researchers based on literature review and expert opinions. There were 28 variables in total, including: gender, age, marital status, only child, number of children, educational level, religious belief, household registration, years of working experience, years of working in ICU, professional title, position, nature of employment, average weekly working hours, monthly night shifts, patients per shift, average monthly incomes, income satisfaction, nursing job satisfaction, nursing career re-choice intention, sleep hours per day, diet habit, regular physical exercise, physical condition, and attend mental health training.

The Chinese version of CF scale (CF-CN)

Stamm [15] developed the Professional Quality of Life Scale, Chen and Wang [16] translated and validated the CF-CN. CF-CN was used to assess CF symptoms among Chinese nurses. CF-CN comprises three subscales: compassion satisfaction, burnout, and secondary traumatic stress. Each subscale contains 10 items using a five-point Likert scale. The total score ranges from 30 to 150 points; however, items 1, 4, 15, 17, and 29 are reverse-scored. The overall critical values for each subscale were compassion satisfaction < 37, burnout > 27, and secondary traumatic stress > 17. If none of the three subscales exceeded the critical value, there were no symptoms of CF, and if any subscale exceeded the critical value, symptoms of CF were present. One subscale exceeding the critical value indicated low CF, two subscales exceeding the critical value were considered moderate CF, and all three subscales exceeding the critical value were considered severe CF. Herein, Cronbach’s α coefficient of CF-CN was 0.890.

Perceived social support scale (PSSS)

PSSS was compiled by Zimet et al. [17] and revised into the Chinese version by Jiang [18]. The Chinese version of the PSSS comprises three dimensions: family support, friend support, and other support, comprising 12 items. The scale adopts a seven-point Likert scale with a total score range of 12–84 points. The higher the score, the higher the degree to which an individual feels supported by society. The Cronbach’s α coefficient of the scale in this study was 0.912.

Connor-Davidson resilience scale (CD-RISC)

CD-RISC, developed by Connor and Davidson [19] and subsequently translated and revised by Yu and Zhang [20] was employed to measure the resilience level. The scale includes three subscales (25 items in total): tenacity, strength, and optimism. This self-report scale is a five-point Likert scale. The total score ranges from 0 to 100, with higher scores indicating a greater level of psychological resilience. Herein, the Cronbach’s α coefficient of this scale was 0.976.

Practice environment scale (PES)

PES was developed by Associate Professor Lake of the University of Pennsylvania based on the Nursing Work Index Revised scale, revised by Aiken. The Chinese version was translated and edited by Wang and Li [21] and was mostly utilized to assess the characteristics of the nursing work environment in the respective hospitals of the nurses. The self-report PES comprises five subscales: nurse participation in hospital affairs, nursing foundations for quality of care, nurse manager ability, leadership, and support of nurses, staffing and resource adequacy, and collegial nurse-physician relations. Each item was categorized into four levels, 1–4 (points), and each item was scored as follows: 1 = strongly disagree, 2 = disagree, 3 = agree, 4 = strongly agree. The total score of this scale ranges from 28 to 112 points. The higher the total score, the better the working environment of the nurses. Herein, the Cronbach’s α coefficient of this scale was 0.833.

Data collection and quality control

After obtaining consent from the nursing departments and head nurses of the ICU of the surveyed hospitals, a trained investigator was assigned to each hospital. The investigator utilized standardized instructions to elucidate the purpose, significance, and content of the study to prospective subjects who met the inclusion and exclusion criteria. The ICU department nurses who consented to participate in this study completed the questionnaires by clicking the link on WeChat or scanning the QR code. This study employed anonymous questionnaires. Each device and IP address was restricted to one submission. Mandatory response fields were incorporated for all items in the online questionnaire system, and automated data validation checks were performed during the data collection period. Completion time was controlled within 10–15 min. After data collection, the responses were reviewed and organized by an ICU head nurse in collaboration with two researchers. Questionnaires were excluded if the completion time was less than 300 s or if patterned response behavior was detected. Through these rigorous quality control procedures, a final analytical dataset comprising 1110 valid responses was obtained, with no missing values across any variables used for model development. Based on the minimum completion time of 372 s recorded in a pre-survey of 50 ICU nurses, and to balance fault tolerance and data quality, this study set the completion time threshold for valid questionnaires at 300 s. A comparison revealed no statistically significant differences in baseline characteristics between the 32 samples excluded according to this criterion and the 1110 included samples (P > 0.05), indicating that no systematic bias was introduced by the exclusion process (see Supplementary Materials).

Statistical analysis

This study utilized the R software (version 4.4.2) for statistical analysis. Measurement data that were not normally distributed are expressed as [M (P25, P75)], and the Mann–Whitney U test was employed for group analysis. Count data are presented as frequency and percentage, with group comparisons using the χ2 test or Fisher’s exact probability test. A P < 0.05 was considered statistically significant.

To ensure the independence of data splitting and prevent data leakage during model construction and evaluation, the dataset was randomly divided into a training set and a test set at a ratio of 7:3. The outcome variable was CF, which was coded as a binary variable: category 0 indicated nurses without CF (the minority class), and category 1 indicated nurses with CF (the majority class). We adopted algorithm-specific class weight tuning to compensate for the class imbalance, ensuring that minority class misclassifications were assigned higher penalties during model training. For the LR and SVM models, class_weight = “balanced” was set to counter data imbalance, a method that calculates the weight for each class as the inverse of class frequency. For the XGBoost and LGBM models, the scale_pos_weight parameter was used to handle class imbalance. In the training set, the majority class (CF = 1) was assigned a weight of 1, and the minority class (CF = 0) was assigned a weight 3.44 times that of the majority class. All feature selection, hyperparameter tuning, and model construction were exclusively performed in the training set. In the training set, the Boruta algorithm and LASSO regression (ten-fold cross-validation) were used separately for feature selection, and variables selected by both methods were used to construct the models. Four ML algorithms—LR, XGBoost, SVM, and LGBM—were employed to construct and train models, and hyperparameter tuning was conducted via the grid search method. During model training, ten-fold cross-validation was applied to optimize model performance and assess stability and generalizability. The above four machine learning algorithms fall within the category of supervised learning and are suitable for binary classification modeling. These algorithms are trained on labeled datasets containing feature variables and outcome variables, and minimize model error through iterative optimization, thereby enhancing model performance while effectively mitigating overfitting. Such algorithms are widely used in clinical research. They not only provide satisfactory interpretability but also adequately capture complex nonlinear relationships in the data, enabling a more comprehensive and reliable comparison of model performance. Finally, the model evaluation metrics included the AUC, accuracy, precision, recall, F1 score, and Brier score to evaluate model performance. To further interpret the features within the models, SHAP values were utilized to analyze each variable’s contribution to the outcomes.

Ethical considerations

This study adhered to the TRIPOD guidelines. This study was approved by the Ethics Review Committee of the Affiliated Hospital of Binzhou Medical University (Approval Number: KYLL-365). This study strictly adhered to the ethical requirements of the Declaration of Helsinki and followed applicable national guidelines. All ICU nurses who participated in this survey signed an informed consent form. The consent form explicitly informed participants about the purpose and methodology of the study as well as the intended use of their data for ML research. All data were handled with strict confidentiality.

Results

Baseline data characteristics and prevalence of CF

We collected 1110 valid questionnaires from the ICU nurses. There were 286 male and 824 female nurses. The nurses aged between 30 and 40, accounting for 56.2%, and 75.5% of them were married. The mean CF-CN Scale score was (84.53 ± 13.63). The prevalence of CF among ICU nurses was 78.2%. The dataset was split into a training set including 777 participants (70%) and a test set of 333 participants (30%). No statistically significant difference was observed between the baseline information of the two groups in the training and test sets (P > 0.05; Table 1).

Table 1.

The characteristics of 1110 ICU nurses in training and test sets

Variable Category Training set N = 777(%) Test set N = 333(%) Statistics P
Gender Male 211(27.2) 75(22.5) 2.379a 0.123
Female 566(72.8) 258(78.5)
Age (years) ≤ 25 97(12.5) 38(11.4) 4.514a 0.341
26 –30 190(24.4) 78(23.4)
31 –35 260(33.5) 104(31.2)
36 –40 180(23.2) 80(24.0)
≥ 41 50(6.4) 33(10.0)
Marital status Single 190(24.5) 67(20.1) * 0.120
Married 579(74.5) 259(77.8)
Divorced/Widowed 8(1.0) 7(2.1)
Only child Yes 595(76.6) 261(78.4) 0.333a 0.564
No 182(23.4) 72(21.6)
Number of children No 259(33.3) 101(30.3) 0.827a 0.363
Yes 518(66.7) 232(69.7)
Educational level Associate degree or less 71(9.1) 36(10.8) 0.873a 0.646
Bachelor’s degree 654(84.2) 277(83.2)
Master’s degree or above 52(6.7) 20(6.0)
Religious belief No 768(98.8) 331(99.4) * 0.521
Yes 9(1.2) 2(0.6)
Household registration Countryside 527(67.8) 210(63.1) 2.160a 0.142
City 250(32.2) 12(36.9)
Years of working experience 1 –5 233(30.0) 85(25.5) 3.875a 0.275
6 –10 204(26.2) 90(27.0)
11 –15 244(31.4) 105(31.5)
≥ 16 96(12.4) 53(16.0)
Years of working in ICU 1 –5 277(35.6) 109(32.8) 4.656a 0.199
6 –10 225(29.0) 92(27.6)
11 –15 218(28.1) 95(28.5)
≥ 16 57(7.3) 37(11.1)
Professional title Nurse 110(14.1) 44(13.2) 5.393a 0.145
Senior nurse 215(27.7) 73(21.9)
supervisor nurse 411(52.9) 200(60.1)
Deputy chief nurse and above 41(5.3) 16(4.8)
Position General nurse 748(96.3) 313(94.0) 2.342a 0.126
Head nurse 29(3.7) 20(6.0)
Nature of employment Contract nurse 488(62.8) 210(63.1) 0.603a 0.740
Personnel agency nurse 167(21.5) 6(19.8)
Staff nurse 122(15.7) 57(17.1)
Average weekly working hours ≤ 40 214(27.6) 99(29.7) 0.562a 0.755
41 –50 509(65.5) 211(63.4)
≥ 51 54(6.9) 23(6.9)
Monthly night shifts 0 36(4.6) 17(5.1) 1.194a 0.754
1 –4 271(34.9) 105(31.5)
5 –9 434(55.9) 195(58.6)
≥ 10 36(4.6) 16(4.8)
Patients per Shift ≤ 2 134(17.2) 58(17.4) <0.001a 1.000
≥ 3 643(82.8) 275(82.6)
Average monthly incomes (yuan) ≤ 5000 74(9.5) 35(10.5) 3.075a 0.380
5001 –10,000 543(69.9) 216(64.9)
10,001 –15,000 139(17.9) 73(21.9)
> 15,000 21(2.7) 9(2.7)
Income satisfaction Dissatisfied 107(13.8) 52(15.6) 0.668a 0.716
Normal 404(52.0) 168(50.5)
Very satisfied 266(34.2) 113(33.9)
Nursing job satisfaction Dissatisfied 45(5.8) 19(5.7) 0.034a 0.983
Normal 378(48.6) 164(49.2)
Satisfied 354(45.6) 150(45.1)
Nursing career re-choice intention No 559(71.9) 238(71.5) 0.008a 0.930
Yes 218(28.1) 95(28.5)
Sleep hours per day ≤ 6 h 246(31.7) 106(31.8) <0.001a 1.000
> 6 h 531(68.3) 227(68.2)
Diet habit Poor 201(25.9) 87(26.1) 0.260a 0.878
General 341(43.9) 141(42.4)
Perfect 235(30.2) 105(31.5)
Regular physical exercise No 601(77.3) 274(82.3) 3.110a 0.078
Yes 176(22.7) 59(17.7)
Physical condition Poor 56(7.2) 28(8.4) 1.360a 0.507
Neutral 494(63.6) 218(65.5)
Good 227(29.2) 87(26.1)
Attend mental health training No 645(83.0) 275(82.6) 0.008a 0.931
Yes 132(17.0) 58(17.4)
PSSS [M(P25, P75)] 67(55,75) 68(56,73) 0.095b 0.924
CD-RISC [M(P25, P75)] 70(62,75) 70(62,75) -0.578b 0.563
PES [M(P25, P75)] 84(80,95) 84(80,98) -0.233b 0.815

Note: a = χ2, b = Z, * = Fisher

Screening feature variables

The Boruta algorithm identified potential feature variables in the training set by comparing the original features with randomly generated “shadow features”. The Boruta algorithm, an extension of the RF algorithm, identified 16 variables: age, marital status, educational level, years of working experience, years of working in ICU, professional title, monthly night shifts, income satisfaction, nursing job satisfaction, nursing career re-choice intention, sleep hours per day, diet habit, physical condition, PSSS, CD-RISC, and PES (Fig. 1a). However, LASSO regression performs non-zero coefficient screening by using the L1 regularization term and identifies the optimal λ value through tenfold cross-validation. Herein, LASSO regression was utilized to identify characteristic factors in the training set, including educational level, income satisfaction, nursing career re-choice intention, physical condition, PSSS, CD-RISC, and PES (Fig. 1b-c). Through the comparison and analysis of the Boruta algorithm and LASSO regression in screening feature variables, we identified the common subset of feature variables selected by both methods. These variables utilized for model construction included educational level, income satisfaction, nursing career re-choice intention, physical condition, PSSS, CD-RISC, and PES.

Fig. 1.

Fig. 1

Screening results. (a) Boruta; Green denotes important variables, yellow indicates variables under consideration, red represents rejected variables, and blue represents shaded features. (b) LASSO regression coefficient path diagram; (c) ten-fold cross-validation chart

Model development and evaluation

Based on the seven selected variables, four CF classification models—LR, XGBoost, SVM, and LGBM—were constructed. All models were trained after hyperparameter tuning and comprehensively evaluated using AUC, accuracy, precision, recall, F1 score, and Brier score. The training set 10-fold cross-validation evaluation results indicated that the XGBoost model demonstrated the best classification performance (AUC = 0.868, 95% CI: 0.836 –0.899), followed by LGBM (AUC = 0.841, 95% CI: 0.808–0.875). The AUC values for LR and SVM were 0.822 (95% CI: 0.784–0.859) and 0.815 (95% CI: 0.776–0.853), respectively. The XGBoost model had the highest precision. The evaluation results in the test set further confirmed the findings from the training set. The XGBoost model demonstrated the best performance in the test set (AUC = 0.832, 95% CI: 0.779–0.885), exhibiting superior classification performance compared to other models. LGBM and LR followed with AUC values of 0.820 (95% CI: 0.764–0.875) and 0.820 (95% CI: 0.767–0.873), respectively. The AUC value for SVM was 0.813 (95% CI: 0.758–0.868). Brier score below 0.25 generally indicates satisfactory model performance whereas a higher value suggests the need for model refinement. All four models in this study achieved Brier scores below 0.25, signifying good calibration. XGBoost has the smallest Brier score on both the training set and the test set, indicating the best calibration. Calibration curves of all models were shown in Fig. 2a-b. Taking into account the performance of all indicators comprehensively, XGBoost was regarded as the optimal model in this study (see Table 2). Fig. 3a-b depicted the ROC curves of the four models in the training set and test est.

Fig. 2.

Fig. 2

Comparison of calibration capabilities of four models (a) training and (b) test sets

Table 2.

Performance of four models on training and test sets

Model AUC (95% CI) Accuracy Precision Recall F1 Brier
Training set
LR 0.822 (0.784,0.859) 0.753 0.918 0.747 0.824 0.125
XGBoost 0.868(0.836, 0.899) 0.766 0.935 0.748 0.831 0.108
SVM 0.815 (0.776,0.853) 0.744 0.910 0.742 0.817 0.125
LGBM 0.841 (0.808,0.875) 0.789 0.904 0.813 0.856 0.120
Test set
LR 0.820 (0.767,0.873) 0.751 0.926 0.748 0.827 0.122
XGBoost 0.832 (0.779,0.885) 0.733 0.932 0.718 0.811 0.116
SVM 0.813 (0.758,0.868) 0.739 0.916 0.741 0.819 0.124
LGBM 0.820 (0.764,0.875) 0.769 0.895 0.805 0.848 0.118

Fig. 3.

Fig. 3

ROC curves in (a) training and (b) test sets

Optimal model SHAP explanation

The relative importance of the variables in the XGBoost model was established by calculating the SHAP value for each attribute. The bar chart of global feature variables in Fig. 4a showed that psychological resilience made the greatest contribution to the model output with the largest SHAP values, followed by comprehension of perceived social support, practice environment, income satisfaction, educational level, physical condition, and nursing career re-choice intention. Fig. 4b illustrates the explanation of each feature variable. The results indicated that among ICU nurses, higher levels of education, greater satisfaction with income, willingness to re-select the nursing profession, and better physical health were associated with smaller SHAP values, as were higher self-rated scores on the PSSS, PES, and CD-RISC scales. These factors were demonstrated to exert a negative effect on the risk of CF. Fig. 5 displayed the SHAP waterfall plot for an ICU nurse in the test set. The results showed that this nurse was satisfied with their income, had a self-rated PES score of 106, was in good physical health, had a CD-RISC score of 72, held a bachelor’s degree, was unwilling to choose nursing again, and had a PSSS score of 72. The probability value for this nurse was calculated as f(x) = 0.869, which was lower than the baseline value E[f(x)] = 1.36. Accordingly, this nurse was classified as not having developed CF, which was consistent with the actual result from the questionnaire survey.

Fig. 4.

Fig. 4

SHAP explanation for the XGBoost model. (a) bar chart of global feature variables; (b) the explanation chart of each feature variable

Fig. 5.

Fig. 5

The explanation SHAP waterfall plot for an ICU nurse

Discussion

Current status of CF among ICU nurses

CF is a common issue among ICU nurses. It exerts a profound negative impact on nurses’physical and mental health and career development, and adversely affects patient safety, organizational efficiency, and the healthcare system. This multicenter cross-sectional study demonstrated that the prevalence of CF among ICU nurses was 78.2%. Our findings are consistent with previous findings reported among Chinese ICU nurses in Fujian [22]. Moreover, compared with ICU nurses in the United States and Australia [23, 24], as well as nurses in other departments (emergency and oncology department) [25, 26], the Chinese ICU nurses in our study exhibited a higher prevalence of CF. These differences may be attributed to variations in sociocultural context, economic conditions, and health resource allocation. Additionally, compared with other departments, ICU patients’ critical condition, high mortality rate, complex nursing operations, rapid work pace, low tolerance for error, and long-term high-pressure state can easily lead to adaptive resource depletion and physical and mental health disorders [27]. Second, the ICU working environment is restrictive to independent management; ICU nurses simultaneously deliver technical care and emotional support, particularly for intubated patients who cannot express themselves. They must perceive the patient’s pain through non-verbal communication, and their emotional investment is deeper, leading to emotional depletion. This study demonstrated that 30.6% of ICU nurses reported maintaining a regular diet. The work need to handle emergencies at any time required adaptation to the workflow of specialized nursing care [28]. This conditions often require changes in dietary habits, including irregular meal times, thereby contributing to a prolonged cycle of physical and mental fatigue, contributing to CF and burnout symptoms. Nursing managers should optimize the nursing workflow, rationally allocate human resources, develop scientific scheduling strategies, consider the physiological and psychological well-being of nurses, mitigate the risk of nurses’ CF, and deliver patient-centered quality nursing services.

Influencing factors of CF among ICU nurses

The level of psychological resilience, perceived social support and practice environment score

Our findings indicate that psychological resilience, perceived social support and practice environment are significant protective factors against CF, consistent with findings reported in previous studies [29, 30]. Psychological resilience is a stable protective factor that promotes adaptive behavior, and by enhancing the level of psychological resilience, nurses help individuals sustain positive emotions during stressful events. These positive emotions can enhance personal knowing ability and improve empathy, thereby reducing the occurrence of CF. Therefore, the psychological resilience of ICU nurses can directly determine their CF. Tai et al. [31] research demonstrated that psychological resilience was related to the functional balance between the prefrontal cortex (responsible for decision-making and emotion regulation) and the amygdala (emotional response center) of the brain. Individuals possessing high psychological resilience can effectively inhibit the overactivation of the amygdala via prefrontal cortex regulation under the stress of empathy and reduce the release of cortisol (stress hormone). Consequently, healthcare organizations are urged to implement positive thinking stress reduction training, establish peer support groups, offer psychological counseling, and provide additional mental health supportive services. They should prioritize the psychological development of nurses, improve psychological capital, and enhance psychological resilience, enabling nurses to sustain their empathic ability while mitigating CF, thereby improving the quality of nursing care and personal occupational well-being.

Stress buffering theory posits that substantial social support can protect individuals from the adverse impacts of stressors [32]. This indicates that an increased level of collateral social support is beneficial in mitigating the effects of external stressors on CF. Social support functions as a safety net, enabling individuals to build support from family, friends, and coworkers, allowing nurses to focus on their duties, alleviate work stress, release negative emotions, reduce the level of CF, and enhance professional identity [33]. Therefore, it is recommended that nursing managers establish effective social support networks for nurses, assist them in seeking positive social support when facing occupational and psychological stress, and implement positive coping strategies to alleviate nurses’ CF.

An effective practice environment requires medical institutions to rationally integrate nursing human and material resources according to their own resources, prioritize the career development of nursing talents, and standardize and systematize nursing management and performance appraisal. Furthermore, it requires nursing managers to continuously improve their leadership style, enhance their management ability, fortify the healthcare team structure, enhance the awareness of cooperation, and enhance the nurses’ sense of belonging, mission, and enthusiasm for nursing work, thereby enhancing the level of nursing services and reducing the risk of CF. This aligns with a study by Swiger et al. [34]. The practice environment scores directly indicate the degree of magnetic management in the hospital, with higher scores indicating greater appeal to ICU nurses and a substantially lower degree of CF. A good practice environment can aid ICU nurses in solving work-life balance problems on a broader level. For instance, flexible working duration and reasonable vacation policies can enhance nurses’ sense of autonomy and alleviate the burden of family responsibilities, thus further reducing the risk of CF.

Nursing career re-choice intention

The results of this study revealed that 71.8% of ICU nurses would not choose nursing as a profession again. Their main reasons included high workload, violence in healthcare settings, frequent night shifts, and excessive emotional toll. Previous studies have proposed that CF is the main factor contributing to the global shortage of nurses [35]. If CF is ineffectively addressed, nurses will eventually choose to resign, significantly affecting the stability of the nursing team. ICU nurses have expressed dissatisfaction with their current nursing care, often questioning the value of their work, experiencing a diminishing sense of professional accomplishment, and accumulating negative emotions. However, they feel obligated to maintain empathy, making them susceptible to cognitive dissonance. Many experience CF, which contributes to their reluctance to choose nursing again. This study result is consistent with the evidence of Ruiz-Fernández et al. [36] evidence. Medical institutions should strengthen resource allocation and establish a sound incentive system to improve the sense of achievement and belonging.

Income satisfaction

Furthermore, we observed that income discontent was a significant influencing factor of CF, consistent with the findings of Yin et al. [37]. This indicates that financial stress and perceived inadequate compensation may adversely affect nurses’ emotional well-being. Income is an important energy resource for nurses. When nurses’ income satisfaction is diminished, it depletes an individual’s material and psychological resources, hindering their ability to respond effectively to patients’ emotional needs [38]. Furthermore, when compensation is perceived as inadequate relative to workload, it engenders a sense of professional futility and weakens empathic motivation. Medical institutions should construct a fair performance allocation scheme to stimulate their work enthusiasm and subjective initiative and improve the value of self-realization.

Educational level

Our analysis revealed that a lower educational level is correlated with a higher level of CF among nurses, as indicated by the SHAP model analysis, consistent with the results by Kim et al. [39]. Low-educated nurses may not have systematically learned how to balance empathic engagement and self-protection and lack effective coping strategies when exposed to patient suffering for a long period of time. Highly educated nurses possess solid theoretical knowledge and exceptional critical thinking and problem-solving skills, and can distinguish between personal emotions and objective facts, adopt a positive work attitude, and avoid emotional exhaustion. Therefore, nursing managers should prioritize the career development needs of low-educated nurses, promote continuous education advancement, enhance training, and assist low-educated nurses to enhance their professional knowledge and skills.

Physical condition

This study found that physical condition was a key factor of CF among ICU nurses, consistent with the findings of previous studies [40]. The study revealed that 61.4% of ICU nurses worked more than five night shifts per month. Frequent night shift schedules disrupted circadian rhythms and compromised physical health. During shift work, nurses faced heavy workloads, which typically required robust physical conditions as a foundation. Additionally, they spent prolonged periods with patients and were immersed in patients’negative emotions. According to Conservation of Resources theory [41], individuals require resources to cope with stress. When self-rated physical condition is poor, more physiological resources may be depleted, while empathy demands substantial cognitive and emotional resources. Limited resources are prioritized for maintaining basic physiological functions, disrupting the balance of resources and ultimately leading to CF.Therefore, it is recommended that nursing managers should focus on the physical health status of nurses, implementing a magnetic management model that integrates professional support with humanistic care.

The XGBoost model of CF among ICU nurses has a good classification effect

Previous studies have found that there are many key factors for CF among ICU nurses, but no classification model has been established. We developed and evaluated four classification models of the CF for ICU nurses. The results revealed that the AUC value of the XGBoost model for identifying the risk of CF among ICU nurses was 0.832(95% CI: 0.779–0.885), surpassing that of LR, SVM, and LGBM. The accuracy, precision, recall, F1 score, and Brier score were 0.733, 0.932, 0.718, 0.811, and 0.116, respectively. Considering all indicators comprehensively, the XGBoost model exhibited the best performance. The SHAP model facilitated explanation, as global explainability allows nursing managers to identify the main factors for CF among ICU nurses, enhance model transparency, and improve the generalization ability; local explainability aids nursing managers in early prevention and implementation of personalized interventions for high-risk individuals.

Implications

Despite the growing body of research on CF, this study advances the literature by addressing several critical gaps. First, we developed an explainable ML classification model using a comprehensive set of individual, psychosocial, and organizational factors. These included psychological resilience, perceived social support, practice environment, nursing career re-choice intention, income satisfaction, educational level, and sleep hours per day. These factors are not only theoretically grounded but also modifiable, offering actionable levers for intervention. Second, by employing a multicenter design across 25 tertiary hospitals, we enhance the generalizability of our findings within the Chinese context. Third, using SHAP for model explanation moves beyond traditional black-box ML algorithms, providing global and local explainability to identify key risk factors and support individualized risk assessment.

Study findings underscore the importance of integrating psychological and organizational factors—such as psychological resilience, perceived social support, and practice environment—into targeted strategies to mitigate CF among ICU nurses. The strength of these modifiable factors suggests that evidence-based interventions can effectively reduce CF risk. For instance, healthcare organizations should implement resilience-building programs—such as mindfulness training, peer support groups, and psychological counseling—to enhance nurses’ adaptive capacity [42–44]. To strengthen social support, nursing managers should foster supportive workplace cultures and facilitate access to emotional and instrumental resources. Similarly, Ni et al. [27] demonstrated that improving the practice environment through magnetic management strategies—including participatory leadership, adequate staffing, and professional development opportunities—can also buffer against CF. Additionally, medical institutions should formulate policy-based systems to address systemic issues through fair compensation, flexible scheduling, and career development paths, which may further reduce the prevalence of CF. Finally, the XGBoost-based classification model, combined with SHAP analysis, can be integrated into the hospital information management system to serve as a practical tool for proactively identifying nurses at high risk of CF. This enables nursing managers to leverage real-world data to implement timely and personalized interventions, thereby enhancing nurse well-being and safeguarding the quality of care.

Limitations

This study has several limitations. First, this study adopted a cross-sectional design, so the temporal sequence between variables and CF cannot be confirmed, and reverse causality cannot be excluded. Future studies should employ longitudinal cohort designs to collect data at multiple time points, which will help clarify the causal direction between these variables and CF, and provide more robust evidence for the development of intervention strategies. Second, reliance on self-reported survey data introduces the potential for bias. Social desirability bias may lead participants to underreport negative states like CF, while response bias could affect the accuracy of responses related to behaviors like sleep hours or physical exercise. Third, this study employed convenience sampling to collect data from multiple tertiary hospitals in specific regions of China. While this method facilitates preliminary model development, it may introduce selection bias, limiting the generalizability of findings to broader populations of nurses such as those in primary care facilities or those in other regions. Furthermore, the analysis did not account for within-hospital clustering effects, which may lead to an overestimation of model performance metrics.

Given these limitations, future studies should employ randomized or stratified sampling strategies, incorporate objective biomarkers or administrative data, and conduct multi-regional external validation to enhance the model’s robustness, generalizability, and practical applicability.

Conclusion

Our findings indicate that classification models of CF among ICU nurses were constructed using four ML algorithms with feature variables selected through the Boruta algorithm and LASSO regression. Critical variables, including psychological resilience, perceived social support, and practice environment, income satisfaction, educational level, physical condition, and nursing career re-choice intention, were identified. The XGBoost model demonstrated optimal performance with high classification precision and strong generalization ability. Based on the SHAP value visualization analysis, the influence of each variable on CF was further clarified. This study provides a basis for managers to optimize management measures and develop effective prevention and intervention strategies.

Supplementary Information

Below is the link to the electronic supplementary material.

Supplementary Material 1 (28.2KB, docx)

Acknowledgements

Authors gratefully acknowledge the 1110 participants who responded to the survey, and the nursing administrators from the collaborating hospitals for supporting this investigation.

Abbreviations

CF

Compassion fatigue

ICU

Intensive care units

AUC

The area under the curve

SHAP

Shapley additive explanations

ML

Machine learning

LR

Logistic Regression

XGBoost

Extreme Gradient Boosting

SVM

Support Vector Machine

LGBM

Light Gradient Boosting Machine

CF-CN

The Chinese Version of CF Scale

PSSS

Perceived Social Support Scale

CD-RISC

Connor-Davidson Resilience Scale

PES

Practice Environment Scale

Author contributions

XB, SL, PG and XC conceived and designed the study. HW and DZ assisted in the collection of data. SL and XC provided statistical advice on the study design and analysed the data. XB and HW were involved in the preparation and revision of the manuscript. All authors read and approved the final manuscript.

Funding

This study was supported by Shandong Province Medical Health Science and Technology Project. (No:202314010490).

Data availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

Declarations

Ethics approval and consent to participate

This study was approved by the Ethics Review Committee of the Affiliated Hospital of Binzhou Medical University (Approval Number: KYLL-365). This study strictly adhered to the ethical requirements of the Declaration of Helsinki and followed applicable national guidelines. All ICU nurses who participated in this survey signed an informed consent form. The consent form explicitly informed participants about the purpose and methodology of the study as well as the intended use of their data for ML research. All data were handled with strict confidentiality.

Consent for publication

Not applicable.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Xueling Bian and Shunlian Luan contributed equally to this work.

References

  • 1.Kabunga A, Kigongo E, Tumwesigye R, Udho S, Musinguzi M, Acup W, et al. A systematic review and meta-analysis of compassion fatigue among healthcare professionals before and during COVID-19 in Sub-Saharan Africa. PLOS Global Public Health. 2024;4(6):e3388. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Pan L, Wang G, Jiang J. Discussion on performance evaluation system of intensive care unit for DRG. Chin Hosp. 2024;28(2):86–9. [Google Scholar]
  • 3.Hu Z, Wang H, Xie J, Zhang J, Li H, Liu S, et al. Burnout in ICU doctors and nurses in mainland China–A national cross-sectional study. J Crit Care. 2021;62:265–70. [DOI] [PubMed] [Google Scholar]
  • 4.Xie W, Chen L, Feng F, Okoli CTC, Tang P, Zeng L, et al. The prevalence of compassion satisfaction and compassion fatigue among nurses: A systematic review and meta-analysis. Int J Nurs Stud. 2021;120:103973. [DOI] [PubMed] [Google Scholar]
  • 5.Roskvist R, Consedine NS. Is compassion fatigue a self-fulfilling prophecy in health care? A preregistered experimental study of manipulated expectations in doctors and medical trainees. Brit J Health Psych. 2025;30(3):e70013. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Yee A, Kauric-Klein Z. Managing Compassion Fatigue in Intensive Care Unit Nurses. Dimens Crit Care Nur. 2025;44(3):145–58. [DOI] [PubMed] [Google Scholar]
  • 7.Quesada-Puga C, Izquierdo-Espin FJ, Membrive-Jiménez MJ, Aguayo-Estremera R, Cañadas-De La Fuente GA, Romero-Béjar JL, et al. Job satisfaction and burnout syndrome among intensive-care unit nurses: A systematic review and meta-analysis. Intens Crit Care Nur. 2024;82:103660. [DOI] [PubMed] [Google Scholar]
  • 8.Yarad E, Bates S, Butler M, Byrne K, Eastwood G, Grattan S, et al. Job satisfaction and symptoms of depression, anxiety, stress, and burnout: A survey of Australian and New Zealand intensive care research coordinators. Aust Crit Care. 2023;36(1):35–43. [DOI] [PubMed] [Google Scholar]
  • 9.Zhao Y, Wang X, Liu T. Correlations between empathy fatigue, occupational identity, and sleep quality in nursing staff: a cross-sectional study. Front Public Health. 2024;12:1401044. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Baris VK, Fu Y, Gilbreath B, Rainbow J, Fiorini LA, Love P. Harnessing Machine Learning to Predict Nurse Turnover Intention and Uncover Key Predictors: A Multinational Investigation. J Aav Nurs. 2025;0:1–15. [DOI] [PubMed] [Google Scholar]
  • 11.Li Z, Cai Y, Wang Y, et al. Prediction of cancer-specific survival status of patients with early colorectal adenocarcinoma after endoscopic therapy based on machine learning algorithms. Nurs Res. 2024;38(14):2459–67. [Google Scholar]
  • 12.Zeng Y, Zhao X, Xie Z, Lin X, Qi M, Li P. Prediction of Job Burnout in Nurses Based on the Job Demands-Resources Model: An Explainable Machine Learning Approach. J Adv Nurs. 2026;82(3):2232–44. [DOI] [PubMed] [Google Scholar]
  • 13.Yang J, Qiao P, Li Y, Wang N. A Review of Machine-learning Classification and Algorithms. Stat Decis. 2019;35(6):36–40. [Google Scholar]
  • 14.Riley RD, Ensor J, Snell KIE, Harrell FE, Martin GP, Reitsma JB, et al. Calculating the sample size required for developing a clinical prediction model. Brit Med J. 2020;368:m441. [DOI] [PubMed] [Google Scholar]
  • 15.Stamm BH. Compassion Satisfaction and Fatigue (ProQOL) Version 5. 2010.
  • 16.Chen Y, Wang W. Reliability and validity study of the Chinese version of the Compassion Fatigue Scale. Chin Nurs Manag. 2013;13(04):39–41. [Google Scholar]
  • 17.Zimet GD, Powell SS, Farley GK, Werkman S, Berkoff KA. Psychometric characteristics of the multidimensional scale of perceived social support. Assessment. 1990;55(3–4):610–7. [DOI] [PubMed] [Google Scholar]
  • 18.Jiang K. Perceived social support scale. Chin Behav Med Sci. 2001;10(10):41–3. [Google Scholar]
  • 19.Connor KM, Davidson JRT. Development of a new resilience scale: The Connor-Davidson Resilience Scale (CD-RISC). Depress Anxiety. 2003;18(2):76–82. [DOI] [PubMed] [Google Scholar]
  • 20.Yu X, Zhang J. Factor analysis and psychometric evaluation of the Connor-Davidson Resilience Scale (CD-RISC) with chinese people. Soc Behav Personal. 2007;35(1):19–30. [Google Scholar]
  • 21.Wang L, Li L. Reliability and vadility of Chinese version of the Practice Enviroment Scale. Chin J Nurs. 2011;46(2):121–3. [Google Scholar]
  • 22.Zhang Q, Zhang L, Lin R. Investigation of the current status and contributing factors of compassion fatigue among ICU nurses in provincial tertiary hospitals in fuzhou. Fujian Medical J. 2021;43(06):135–137.
  • 23.Jakimowicz S, Perry L, Lewis J. Compassion satisfaction and fatigue: A cross-sectional survey of Australian intensive care nurses. Aust Crit Care. 2018;31(6):396–405. [DOI] [PubMed] [Google Scholar]
  • 24.Mason VM, Leslie G, Clark K, Lyons P, Walke E, Butler C, et al. Compassion Fatigue, Moral Distress, and Work Engagement in Surgical Intensive Care Unit Trauma Nurses. Dimens Crit Care Nur. 2014;33(4):215–25. [DOI] [PubMed] [Google Scholar]
  • 25.Xie W, Liu M, Okoli CTC, Zeng L, Huang S, Ye X, et al. Construction and evaluation of a predictive model for compassion fatigue among emergency department nurses: A cross-sectional study. Int J Nurs Stud. 2023;148:104613. [DOI] [PubMed] [Google Scholar]
  • 26.Algamdi M. Prevalence of oncology nurses’ compassion satisfaction and compassion fatigue: Systematic review and meta-analysis. Nurs Open. 2022;9(1):44–56. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Ni W, Xia M, Jing M, Zhu S, Li L. The relationship between professional quality of life and work environment among ICU nurses in Chinese: a cross-sectional study. Front Public Health. 2023;11:1104853. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Subih M, Salem H, Al Omari D. Evaluation of compassion fatigue and compassion satisfaction among emergency nurses in Jordan: A cross-sectional study. Int Emerg Nurs. 2023;66:101232. [DOI] [PubMed] [Google Scholar]
  • 29.Zhang J, Wang X, Chen O, Li J, Li Y, Chen Y, et al. Social support, empathy and compassion fatigue among clinical nurses: structural equation modeling. BMC Nurs. 2023;22(1):425. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 30.Fu C, Wang Y, Shi X, Wang Y, Liu W, Wang G. Influence of psychological resilience on compassion fatigue in nurses in the operating room: a cross-sectional study in China. BMC Nurs. 2025;24(1):90. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 31.Tai A, Leung M, Geng X, Lau W. Conceptualizing psychological resilience through resting-state functional MRI in a mentally healthy population: a systematic review. Front Behav Neurosci. 2023;17:1175064. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Zhang Y, He H, Yang C, Wang X, Luo JA, Xiao J, et al. Chain mediations of perceived social support and emotional regulation efficacy between role stress and compassion fatigue: insights from the COVID-19 pandemic. Front Public Health. 2023;11:1269594. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Wang J, Su M, Chang W, Hu Y, Ma Y, Tang P, et al. Factors associated with compassion fatigue and compassion satisfaction in obstetrics and gynaecology nurses: A cross-sectional study. Nurs Open. 2023;10(8):5509–20. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Swiger PA, Patrician PA, Miltner RSS, Raju D, Breckenridge-Sproat S, Loan LA. The Practice Environment Scale of the Nursing Work Index: An updated review and recommendations for use. Int J Nurs Stud. 2017;74:76–84. [DOI] [PubMed] [Google Scholar]
  • 35.Nolte AG, Downing C, Temane A, Hastings Tolsma M. Compassion fatigue in nurses: A metasynthesis. J Clin Nurs. 2017;26(23–24):4364–78. [DOI] [PubMed] [Google Scholar]
  • 36.Ruiz-Fernández MD, Pérez-García E, Ortega-Galán ÁM. Quality of Life in Nursing Professionals: Burnout, Fatigue, and Compassion Satisfaction. Int J Environ Res Public Health. 2020;17(4):1253. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Yin J, Zhao L, Zhang N, Xia H. Understanding the interplay of compassion fatigue and moral resilience on moral distress in ICU nurses: a cross-sectional study. Front Public Health. 2024;12:1402532. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Liu SS, Wang WX, Chi X. Current status and influencing factors of the professional quality of life of nurses in infectious disease departmen. J Nurs Sect. 2024;39(13):75–9. [Google Scholar]
  • 39.Kim K, Han Y, Kim J. Korean nurses’ethical dilemmas, professional values and professional quality of life. Nurs Ethics. 2015;22(4):467–78. [DOI] [PubMed] [Google Scholar]
  • 40.Zhang J, Wang X, Xu T, Li J, Li H, Wu Y, et al. The effect of resilience and self-efficacy on nurses’compassion fatigue: A cross‐sectional study. J Adv Nurs. 2021;78(7):2030–41. [DOI] [PubMed] [Google Scholar]
  • 41.Prapanjaroensin A, Patrician PA, Vance DE. Conservation of resources theory in nurse burnout and patient safety. J Adv Nurs. 2017;73(11):2558–65. [DOI] [PubMed] [Google Scholar]
  • 42.Jdeetawey NA, Al Hammouri MM, Rababah JA, Ta’An WF, Suliman M. Effectiveness of a Brief Mindfulness-Based Intervention on Compassion Fatigue and Compassion Satisfaction in Pediatric Nurses. Worldviews Evid Based Nurs. 2025;22(1):e70002. [DOI] [PubMed] [Google Scholar]
  • 43.Bailey AK, Sawyer AT, Robinson PS. A Psychoeducational Group Intervention for Nurses: Rationale, Theoretical Framework, and Development. J Am Psychiat Nurses. 2023;29(3):232–40. [DOI] [PubMed] [Google Scholar]
  • 44.Wahl C, Hultquist TB, Struwe L, Moore J. Implementing a Peer Support Network to Promote Compassion Without Fatigue. J nurs admin. 2018;48(12):615–21. [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary Material 1 (28.2KB, docx)

Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request.


Articles from BMC Nursing are provided here courtesy of BMC

RESOURCES