Skip to main content
BMJ Paediatrics Open logoLink to BMJ Paediatrics Open
. 2025 Oct 28;9(1):e004000. doi: 10.1136/bmjpo-2025-004000

Predicting stillbirth and identifying key maternal risk factors using machine learning

Merga Abdissa Aga 1,✉
PMCID: PMC12574342  PMID: 41161727

Abstract

Background

Stillbirth remains a major public health concern, particularly in low-income and middle-income countries. Identifying maternal and obstetric determinants is essential for prevention and targeted interventions. Logistic regression offers a baseline predictive model, while machine learning (ML) methods, such as Random Forest (RF) and Extreme Gradient Boosting, can improve predictive accuracy and highlight key risk factors through feature importance. This study aimed to predict stillbirth and identify influential maternal and obstetric predictors among pregnant women in Ethiopia using ML models.

Methods

A retrospective cross-sectional study was conducted using maternal and obstetric records from Bishoftu General Hospital, Ethiopia. Predictors included maternal age, weight, gravidity, gestational age at admission and delivery, history of pre-eclampsia, antenatal care visits, pregnancy complications, multiplicity, previous abortion and mode of delivery. Data were split into training (70%) and testing (30%) sets. RF, Gradient Boosting Machines, Support Vector Machines and logistic regression were applied. Model performance was evaluated using accuracy, precision, recall, balanced accuracy and receiver operating characteristic-area under the curve (ROC-AUC). Feature importance and SHapley Additive exPlanations (SHAP) supported interpretability.

Results

Among 549 pregnancies, 17 stillbirths occurred. RF outperformed other models, achieving 92% accuracy, 0.95 ROC-AUC and 0.94 balanced accuracy. Maternal age was the strongest predictor, followed by mode of labour, maternal weight, gravidity and delivery mode. Pregnancy complications and antenatal care visits showed moderate importance, while history of pre-eclampsia, previous abortion and multiplicity contributed minimally. SHAP analysis confirmed these findings and explained variable-specific effects on risk.

Conclusions

Maternal age emerged as the dominant determinant of stillbirth, with labour and delivery factors and maternal characteristics also contributing. ML models, particularly RF, effectively identified high-risk pregnancies and provided interpretable predictions through SHAP analysis. These findings underscore the potential of ML to support targeted prenatal care and reduce stillbirth risk in low-resource settings.

Keywords: Developing Countries, Ethiopia, Infant, Low and Middle Income Countries, Machine Learning


WHAT IS ALREADY KNOWN ON THIS TOPIC

  • Stillbirth is a major public health concern in low-resource settings, with maternal and obstetric factors such as age, complications and inadequate antenatal care linked to its occurrence. Traditional models like logistic regression often have limited predictive ability.

WHAT THIS STUDY ADDS

  • This study shows that machine learning models, especially Random Forest, substantially improve prediction of stillbirth risk. Maternal age, labour and delivery mode, and gravidity were identified as key predictors.

HOW THIS STUDY MIGHT AFFECT RESEARCH, PRACTICE OR POLICY

  • Machine learning can enhance maternal health surveillance by identifying high-risk pregnancies early, supporting targeted interventions and informing policies to reduce stillbirth rates.

Introduction

Adverse birth outcomes, particularly stillbirth, remain a major public health concern worldwide. Globally, over two million stillbirths occur annually, and approximately 2.4 million neonates die within the first month of life, highlighting the urgent need for effective strategies to prevent and manage these outcomes.1 2 Despite advances in maternal and neonatal care, many countries—especially low-income and middle-income countries (LMICs)—continue to face challenges in reducing stillbirth rates.

In Africa, maternal and neonatal health outcomes are particularly concerning. High maternal mortality ratios and neonatal mortality rates reflect gaps in access to quality healthcare, limited utilisation of antenatal services and insufficient capacity for early identification and management of high-risk pregnancies.3 4 Factors such as maternal age, parity, pregnancy complications and health system limitations contribute to elevated stillbirth rates across the continent.

Ethiopia faces similar challenges, with a maternal mortality ratio of 412 per 100 000 live births and a neonatal mortality rate of 27 per 1000 live births,5 6 which is slightly higher than the African regional average of 23 per 1000 live births and above the global average of 17 per 1000 live births.7 Stillbirths are influenced by a complex interplay of maternal, obstetric and clinical factors. Key maternal determinants include age and weight, while obstetric history—such as parity, gravidity and previous abortions—also plays a significant role. Additionally, gestational age (GA) at admission and delivery, antenatal care (ANC) utilisation, pregnancy complications, multiplicity and mode of delivery have been repeatedly identified as important predictors.8,10

Traditional epidemiological studies have often relied on logistic regression or survival analysis to quantify the effects of these determinants.4 11 While these methods provide valuable insights, they have limitations: they assume linear relationships, may not adequately capture interactions among predictors and are less effective for high-dimensional datasets. Moreover, most studies have been conducted in high-income countries, limiting the generalisability of their findings to LMICs such as Ethiopia, where health system constraints and sociocultural factors play a critical role.

In recent years, machine learning (ML) techniques have emerged as powerful tools for predictive modelling in healthcare. ML algorithms, such as Random forests (RFs), gradient boosting machines and support vector machines (SVMs), can model non-linear relationships, handle complex interactions and identify key predictors without strong parametric assumptions.12 13 Several studies have successfully applied ML to predict adverse birth outcomes, demonstrating improved accuracy and the ability to uncover novel risk factors.7 14 However, the application of ML to maternal and neonatal health in Ethiopia remains limited, with few studies using comprehensive hospital-based datasets to predict stillbirth.

Most existing studies on stillbirth prediction have been conducted in high-income countries. In Ethiopia, very few studies have investigated birth outcomes, and none have applied ML techniques; those that exist often focus on a limited set of predictors or specific subpopulations.5 6 In contrast, our study integrates a wide range of maternal, obstetric and clinical variables from hospital records. The increasing availability of hospital records and electronic health data in Ethiopia provides a unique opportunity to apply ML techniques to identify high-risk pregnancies and guide targeted interventions.

This study aims to fill this gap by applying ML approaches to identify determinants of stillbirth among pregnant women in Ethiopia. Using comprehensive maternal, obstetric and clinical data from Bishoftu General Hospital, we develop predictive models that estimate stillbirth risk and determine the most influential predictors. The findings are intended to guide evidence-based prenatal care strategies and targeted interventions to reduce stillbirth risk in Ethiopia and similar LMIC settings.

Methods

Study design and setting

This study employed a retrospective cross-sectional design, analysing maternal and obstetric records from Bishoftu General Hospital in the Oromia region of Ethiopia. The study population included pregnant women with complete records of maternal, obstetric and clinical variables, including maternal age, weight, gravidity, GA at admission and delivery, maternal blood pressure, ANC visits, history of pre-eclampsia, pregnancy complications, multiplicity of pregnancy, previous abortion and mode of delivery. Data were collected from hospital records between January 2023 and December 2023.

Participants

A total of 549 pregnant women who delivered at Bishoftu General Hospital, Ethiopia, between January 2023 and December 2023 were included in this retrospective study.

Inclusion criteria

  • Women who delivered at Bishoftu General Hospital during the study period.

  • Complete maternal and obstetric records, including birth outcome, GA at admission and delivery, maternal age, weight, gravidity and mode of delivery.

Exclusion criteria

  • Pregnancies with missing or incomplete records for any key variables required for the analysis.

  • Multiple hospital admissions for the same pregnancy (only the final delivery record was considered).

  • Records with unclear birth outcomes or unverified GA.

The study population consisted entirely of female participants, and ethnic group information was not recorded in hospital records. All eligible records that met the inclusion criteria were included in the analysis.

Outcome variable

The primary outcome variable was birth outcome, categorised as either alive or stillbirth. This binary classification allows for the application of supervised ML techniques suitable for classification tasks.

Predictor variables

Predictors included maternal and obstetric characteristics: maternal age, weight, gravidity (primigravida, multigravida), GA at admission and delivery, history of pre-eclampsia (no, yes), ANC visits (<4, ≥4), pregnancy complications (no, yes), multiplicity of pregnancy (singleton, twin), previous abortion (no, yes), mode of onset of labour (spontaneous, induced and elective) and mode of delivery (spontaneous vaginal delivery, vacuum, C-section). Continuous variables were standardised to improve model convergence, while categorical variables were encoded using one-hot or label encoding as appropriate.

Data preprocessing

Data cleaning included removing outliers and normalising continuous features.13 Correlation analysis was conducted to identify multicollinearity among predictors, and highly correlated variables were considered for exclusion or consolidation. Feature selection was guided by domain knowledge, univariate statistical significance and automated feature importance ranking from tree-based models.14 To address the class imbalance in the outcome variable, the training set was balanced using the Random Over-Sampling Examples technique, which generates synthetic minority-class examples while preserving the distribution of the majority class.15

The dataset was partitioned into training and testing sets using a 70–30 ratio, a widely used approach in ML to ensure sufficient data for both model learning and independent evaluation.16 To minimise the potential bias from a single random split, we further employed repeated stratified cross-validation, where the train-test split was repeated multiple times, and average performance metrics were reported. This approach provides more stable and reliable estimates of model performance. Performance was assessed using metrics appropriate for imbalanced data, including balanced accuracy and receiver operating characteristic-area under the curve (ROC-AUC).17

approaches

Multiple ML algorithms were employed to predict birth outcomes and identify key determinants:

  1. RF: An ensemble learning method using multiple decision trees to improve prediction accuracy and reduce overfitting.

  2. Extreme Gradient Boosting (XGBoost): An efficient implementation of gradient boosting that builds additive decision trees sequentially to optimise predictive performance. Predictor variables were converted to numeric matrices and the outcome variable was coded as binary (0=alive, 1=stillbirth). Feature importance was computed to identify influential predictors.

  3. SVMs: A classification algorithm that maximises the margin between classes in high-dimensional feature space.

  4. Logistic regression: Included as a conventional statistical method for comparison and interpretability. Firth’s penalised logistic regression is a statistical method designed to address issues in logistic regression models, particularly when dealing with small sample sizes, rare events or complete separation.18 This technique modifies the standard likelihood function to reduce bias in parameter estimates, leading to more reliable results in such challenging scenarios. In R, the logistf package is commonly used to fit Firth’s logistic regression models. This package implements the bias-reduced logistic regression method, which further improves prediction accuracy by adjusting for biases in predicted probabilities.19 In this model, the regression coefficient (β) represents the log-odds change in the probability of stillbirth per unit increase in the predictor. The OR is obtained by exponentiating β(OR=exp(β)) and indicates the multiplicative change in odds of stillbirth associated with a one-unit increase in the predictor.

Model development and evaluation

The dataset was randomly split into training (70%) and testing (30%) sets. Models were evaluated based on accuracy, precision, recall, F1-score and AUC-ROC.13 14 Feature importance and SHapley Additive exPlanations (SHAP) values were computed to interpret model predictions and identify the most influential predictors of birth outcomes.2 7

Patient involvement

This study was retrospective and used anonymised maternal and obstetric records. Patients were not directly involved in the design, conduct or reporting of this research. All data were deidentified to protect patient privacy.

Results

Descriptive analysis of maternal and delivery characteristics

Mothers who attended four or more ANC visits had a higher proportion of alive births (524/540, 97.0%) compared with those with fewer than four visits (8/9, 88.9%). This suggests that adequate ANC attendance may be protective against stillbirth, highlighting the importance of regular prenatal care in improving birth outcomes. The mode of labour onset also influenced birth outcomes. Elective labour showed no stillbirths (13/13, 100%), while induced labour had slightly better survival (323/330, 97.9%) than spontaneous onset (196/206, 95.1%). This indicates that planned or medically supervised labour may reduce the risk of stillbirth. The type of delivery demonstrated variable outcomes. C-sections and spontaneous vaginal deliveries had high survival rates (98.1% and 97.2%, respectively). In contrast, vacuum-assisted deliveries had a higher stillbirth proportion (3/18, 16.7%), likely reflecting that this intervention is often used in high-risk or complicated deliveries (table 1).

Table 1. Distribution of maternal and delivery characteristics by birth outcome (alive vs stillbirth).

Variables Category Birth outcome Total
Alive stillbirth
ANC visits §amp;lt;4 8 (88.9%) 1 (11.1%) 9
≥4 524 (97.0%) 16 (3.0%) 540
Onset labour mode Spontaneous 196 (95.1%) 10 (4.9%) 206
Induced 323 (97.9%) 7 (2.1%) 330
Elective 13 (100%) 0 (0.0%) 13
Delivery mode Spontaneous vaginal delivery 411 (97.2%) 12 (2.8%) 423
Vacuum 15 (83.3%) 3 (16.7%) 18
C-section 106 (98.1%) 2 (1.9%) 108
Previous abortion Yes 35 (94.6%) 2 (5.4%) 37
No 497 (97.1%) 15 (2.9%) 512
Gravidity Primigravidity 206 (97.2%) 6 (2.8%) 212
Multigravidity 326 (96.7%) 11 (3.3%) 337
History of pre-eclampsia Yes 36 (92.3%) 3 (7.7%) 39
No 496 (97.3%) 14 (2.7%) 510
Develop complications Yes 45 (93.8%) 3 (6.3%) 48
No 487 (97.2%) 14 (2.8%) 501
Pregnant multiplicity Singleton 519 (97.0%) 16 (3.0%) 535
Twin 13 (92.9%) 1 (7.1%) 14
Maternal age (years) §amp;lt;30 years 360 (98.4%) 6 (1.6%) 366
≥30 years 172 (94%) 11 (6%) 183
Maternal weight (kg) §amp;lt;70 years 298 (98.3%) 5 (1.7%) 303
≥70 years 234 (95.1%) 12 (4.9%) 246
GA at admission (weeks) §amp;lt;37 weeks (preterm) 37 (92.5%) 3 (7.5%) 40
≥37 weeks (term/post-term) 495 (97.2%) 14 (2.7%) 509
GA at delivery (weeks) §amp;lt;37 weeks (preterm) 28 (90.3%) 3 (9.7%) 31
≥37 weeks (term/post-term) 504 (97.3%) 14 (2.7%) 518

ANC, antenatal care; GA, gestational age.

Women with a history of previous abortion had 94.6% alive births (35/37), while those without previous abortion had 97.1% alive births (497/512). The difference is small, indicating that previous abortion was not strongly associated with birth outcome in this population. The birth outcomes were similar between primigravida (97.2% alive) and multigravida mothers (96.7% alive). This suggests that gravidity does not significantly influence the risk of stillbirth in this dataset. Mothers with a history of pre-eclampsia had slightly higher stillbirth proportions (3/39, 7.7%) compared with those without (14/510, 2.7%). Although the sample size is small, this finding suggests that pre-eclampsia may increase the risk of adverse birth outcomes. Women who developed complications during pregnancy had a stillbirth proportion of 6.3% (3/48), compared with 2.8% (14/501) among those without complications. This indicates that pregnancy complications are associated with a higher risk of stillbirth, highlighting the need for careful monitoring and management. Twin pregnancies showed a slightly higher stillbirth proportion (1/14, 7.1%) compared with singleton pregnancies (16/535, 3.0%). Although the sample of twins is small, the data suggest that multiple pregnancies carry a higher risk of stillbirth than singletons. Overall, factors such as adequate ANC visits, elective labour and C-section delivery appear protective, whereas vacuum-assisted deliveries, history of pre-eclampsia, pregnancy complications and twin pregnancies are associated with increased stillbirth risk. Despite variations across factors, most mothers had live births (>90%), reflecting good maternal care or a relatively low-risk population (table 1).

Maternal age was found to have a notable association with birth outcomes. Mothers aged below 30 years had a stillbirth rate of only 1.6%, compared with 6.0% among those aged 30 years and above. This indicates that advanced maternal age increases the risk of stillbirth (table 1). Maternal weight also showed an important relationship with birth outcomes. The stillbirth rate was 4.9% among mothers weighing 70 kg or more, while it was only 1.7% among those with lower weight. This finding implies that higher maternal weight, which may reflect overweight or obesity, is associated with an increased risk of stillbirth. GA at admission was another strong predictor. Mothers admitted before 37 weeks of gestation experienced a stillbirth rate of 7.5%, compared with 2.7% among those admitted at term or post-term. This suggests that preterm admission significantly increases the risk of adverse outcomes. Similarly, GA at delivery showed a marked effect on birth outcomes. Preterm deliveries (<37 weeks) had a stillbirth rate of 9.7%, whereas term or post-term deliveries had a much lower rate of 2.7% (table 1).

Descriptive analysis revealed clear differences in GA between groups. Both GA at admission and at delivery were lower among stillbirth cases compared with live births, with preterm pregnancies showing a higher proportion of stillbirths (table 1). While this underscores the clinical relevance of GA, these variables were not included in the ML models because they are only known late in pregnancy or at delivery, which limits their usefulness for prospective prediction and early intervention. Instead, the predictive analysis focused on maternal and clinical factors available before delivery. This approach allows the models to evaluate risk based on information accessible during pregnancy, thereby improving their potential utility for early identification of high-risk cases.

  1. Firth logistic regression analysis

Firth’s logistic regression has been effectively applied in predicting stillbirth outcomes, particularly in datasets with small sample sizes or rare events. Reducing bias and improving model stability allows for more accurate identification of risk factors associated with stillbirth, thereby informing better clinical decision-making and interventions.

The results show that maternal age ≥30 years was significantly associated with increased odds of the adverse outcome. Mothers aged 30 years or older had about 2.5 times higher odds of experiencing the outcome compared with those younger than 30 years (OR 2.46, 95% CI 1.10 to 5.55, p=0.029). This suggests that advancing maternal age remains a critical risk factor, possibly reflecting the higher likelihood of comorbidities, reduced physiological resilience and increased obstetric complications in older mothers (table 2).

Table 2. Firth logistic regression model results.

Variable β OR 95% CI for OR P value
Maternal age ≥30 years 0.90 2.46 1.10 to 5.55 0.029
Maternal weight ≥70 kg 0.78 2.18 1.01 to 4.65 0.048
Labour Mode: Induced −0.83 0.44 0.27 to 0.72 0.001
Labour Mode: Elective −2.60 0.07 0.01 to 0.38 0.017
Delivery mode: Vacuum 0.59 1.81 1.11 to 2.95 0.018
Delivery mode: C-section −0.38 0.68 0.31 to 1.48 0.240
Gravidity (multigravida) 0.35 1.42 0.80 to 2.51 0.210
History of pre-eclampsia (yes) 1.02 2.77 1.20 to 6.40 0.018
ANC visits (≥4 visits) −0.27 0.76 0.36 to 1.63 0.500
Develop complications (yes) 1.36 3.89 1.49 to 10.15 0.006
Pregnant multiplicity (twin) −0.41 0.66 0.24 to 1.84 0.690
Previous abortion (yes) 1.05 2.86 1.12 to 7.30 0.028
Maternal age ≥30 years 0.90 2.46 1.10 to 5.55 0.029
Maternal weight ≥70 kg 0.78 2.18 1.01 to 4.65 0.048

P value: statistical significance of the predictor. β: regression coefficient from Firth logistic regression.

ANC, antenatal care.

Similarly, maternal weight ≥70 kg was found to be a significant predictor, with an OR of 2.18 (95% CI: 1.01 to 4.65, p=0.048). This indicates that women with higher body weight had more than double the odds of the outcome compared with those weighing less than 70 kg. The association may be explained by the well-documented relationship between maternal overweight/obesity and complications such as gestational hypertension, pre-eclampsia and delivery difficulties, which can in turn contribute to adverse maternal and perinatal outcomes (table 2).

A history of pre-eclampsia was strongly associated with increased risk (OR 2.77, 95% CI 1.20 to 6.40, p=0.018). Women with prior pre-eclampsia had nearly three times the odds of the adverse outcome compared with those without such a history. This finding is consistent with previous literature, which highlights pre-eclampsia as a recurring and persistent risk factor due to its underlying vascular and metabolic consequences (table 2).

Finally, developing complications during pregnancy markedly elevated the risk (OR 3.89, 95% CI 1.49 to 10.15, p=0.006). Mothers who developed complications were nearly four times more likely to experience the outcome compared with those without complications. This underscores the importance of timely detection and management of maternal complications, as these events represent direct pathways to maternal and neonatal morbidity and mortality (table 2).

ML model performance

Overall accuracy of the models ranged from moderate to high. RF achieved the highest accuracy at 92%, followed by XGBoost (82%), SVM (78%) and Firth logistic (71%). This indicates that RF correctly classified the majority of cases, outperforming other models in overall predictive performance. Sensitivity, which measures the ability to correctly identify stillbirth cases, was highest for RF (97%), while Firth Logistic achieved 81%. XGBoost and SVM had lower sensitivities (65% and 60%, respectively), meaning they missed about one-third to nearly half of true stillbirths. High sensitivity is critical for rare adverse outcomes like stillbirth to minimise missed cases (table 3).

Table 3. Model comparison.

Model Accuracy Sensitivity Specificity Balanced accuracy ROC-AUC Precision
Firth logistic 0.71 0.81 0.70 0.75 0.76 0.12
Random orest 0.92 97 0.91 0.94 0.95 0.40
XGBoost 0.82 0.65 0.88 0.76 0.81 0.24
SVM 0.78 0.60 0.78 0.69 0.67 0.11
*

Balanced accuracy=(sensitivity+specificity)/2; it provides unbiased measure of model performance.

ROC-AUC, receiver operating characteristic-area under the curve; SVM, support vector machine; XGBoost, Extreme Gradient Boosting.

Specificity reflects how well models identify alive births. RF again performed best (91%), followed by XGBoost (88%), SVM (78%) and Firth Logistic (70%). This shows that while Firth logistic detected most stillbirths, it produced more false positives among alive cases. Precision, which measures the proportion of predicted stillbirths that were actually true, was highest for RF (40%), indicating that about two-fifths of its stillbirth predictions were correct. XGBoost had moderate precision (24%), while Firth logistic (12%) and SVM (11%) produced many false positive predictions. This highlights that high sensitivity can come at the cost of low precision, particularly in rare-event settings.

Balanced accuracy, which accounts for both sensitivity and specificity, was highest for RF (94%), followed by Firth logistic (75%), XGBoost (76%) and SVM (69%). ROC-AUC, which indicates overall discriminative ability, was also highest for RF (0.95), demonstrating excellent separation between alive and stillbirth cases (table 3).

Overall, RF outperformed all other models across most metrics, balancing high sensitivity, specificity and precision. Firth logistic achieved good sensitivity but very low precision, making it prone to false positives. XGBoost and SVM were less effective, particularly in detecting stillbirths. For rare outcomes, RF provides the most reliable predictions among the models evaluated.

Figure 1 displays the ROC curves for the fitted predictive models for stillbirth. The ROC curves confirm that RF is the best performing model, highlighting its strong discriminative ability. The differences across curves also demonstrate how ML methods like RF can capture nonlinear relationships and interactions that traditional logistic regression may miss.

Figure 1. ROC curves comparing the predictive performance of logistic regression, RF, XGBoost and SVM models for stillbirth. The default classification threshold of 0.5 was used to convert predicted probabilities into class labels. RF, Random Forest; ROC, receiver operating characteristic; SVM, support vector machines; XGBooST, Extreme Gradient Boosting.

Figure 1

Online supplemental figure 1 illustrates the predicted probabilities of stillbirth for each individual in the test dataset, based on the fitted models (Firth logistic regression, RF, XGBoost and SVM). The RF model produced well-separated predicted probabilities, indicating superior ability to classify stillbirth versus live birth compared with the other models.

The most important predictor of stillbirth in the RF model is maternal age, which had the highest MeanDecreaseAccuracy (37.20) and MeanDecreaseGini (69.00). This indicates that removing maternal age would reduce the model’s accuracy the most and that it provides the strongest separation between alive and stillbirth cases (table 4).

Table 4. Variable importance from the RF model for predicting stillbirth.

Variable MeanDecreaseAccuracy MeanDecreaseGini Rank (accuracy) Rank (Gini)
Age 37.20 69.00 1 1
Gravidity 20.77 13.30 2 3
Mode of labour 19.72 10.75 3 4
Delivery mode 17.80 10.10 4 5
Number of ANC visits 16.17 7.01 5 6
Develop complications 12.75 5.85 6 7
Weight 9.84 30.68 7 2
History of pre-eclampsia 8.73 2.90 8 8
Previous abortion 8.09 1.67 9 9
Pregnant multiplicity 2.21 0.37 10 10
*

MeanDecreaseAccuracy: reduction in model accuracy when the variable is permuted; MeanDecreaseGini: reduction in Gini impurity contributed by the variable across all trees.

ANC, antenatal care; RF, Random Forest.

Other strong predictors include gravidity (accuracy: 20.77, Gini: 13.30), mode of labour (accuracy: 19.72, Gini: 10.75) and delivery mode (accuracy: 17.80, Gini: 10.10), all of which play an important role in predicting stillbirth risk. Notably, weight ranked only seventh by accuracy (9.84) but second by Gini importance (30.68), suggesting that it is an influential splitting variable even if it does not consistently improve overall prediction accuracy (table 4).

Number of ANC visits (accuracy: 16.17, Gini: 7.01) and developing complications (accuracy: 12.75, Gini: 5.85) show moderate predictive value, reflecting their contribution to classification in the RF model.

Variables such as history of pre-eclampsia (accuracy: 8.73, Gini: 2.90), previous abortion (Accuracy: 8.09, Gini: 1.67) and pregnant multiplicity (accuracy: 2.21, Gini: 0.37) contributed the least, suggesting that in this dataset, they provide limited additional information for distinguishing birth outcomes (table 4).

Overall, the RF model emphasises maternal age as the dominant predictor, with gravidity, labour and delivery characteristics, and weight also contributing substantially. Less influential variables may still be clinically meaningful but have little predictive power in this dataset. This finding is consistent with clinical knowledge, as advanced maternal age and adverse obstetric factors are well-recognised risk factors for stillbirth.

Figure 2 shows the importance of predictor variables in the RF model for predicting stillbirth, measured using MeanDecreaseAccuracy. Maternal age is the most important predictor, indicating that older mothers are at greater risk of stillbirth and that the model relies heavily on this variable for accurate classification. Gravidity and mode of labour also contribute substantially, highlighting the role of reproductive history and intrapartum factors in determining birth outcomes.

Figure 2. Variable importance plot from the RF model for predicting stillbirth. ANC, antenatal care; RF, Random Forest.

Figure 2

Interestingly, maternal weight ranks relatively low by accuracy importance but high by Gini importance, suggesting that it provides strong splits in the decision trees even if its overall effect on accuracy is smaller. Variables such as delivery mode, number of ANC visits and developing complications show moderate predictive value, while history of pre-eclampsia, previous abortion and pregnant multiplicity contribute the least to the model. Overall, the RF model emphasises maternal age, gravidity and labour-related factors as the strongest predictors of stillbirth, with other covariates playing smaller but clinically relevant roles.

Figure 3 presents the global importance of predictors in the RF model for birth outcomes. The bars display the mean absolute SHAP values, reflecting the average contribution of each variable to the model’s predictions. The ranking shows that age is the most influential predictor, followed by mode of labour, weight, gravidity and mode of delivery. Variables such as the development of complications and number of ANC visits show moderate importance. In contrast, pregnant multiplicity, history of pre-eclampsia and previous abortion contribute the least, suggesting they provide minimal additional predictive information in this dataset.

Figure 3. Global SHAP feature importance for stillbirth outcome prediction. ANC, antenatal care; SHAP, SHapley Additive exPlanations.

Figure 3

Taken together with table 4 and figures2 3, these findings highlight age as the strongest predictor of stillbirth, with mode of labour, weight, gravidity and delivery mode also playing substantial roles. Although less predictive in the model, other clinical variables may still hold important relevance for understanding maternal and fetal risk factors.

Discussion

This study identified maternal age as the most influential predictor of stillbirth in the RF model. Other important contributors included mode of labour, maternal weight, gravidity and delivery mode, while developing complications and number of ANC visits played a moderate role. In contrast, variables such as history of pre-eclampsia, previous abortion and pregnant multiplicity showed minimal predictive value. These findings were confirmed by SHAP analysis, which provided transparent explanations of the contribution of each feature to model predictions. To our knowledge, this is one of the first studies in Ethiopia to integrate ML with SHAP interpretation in predicting stillbirth, offering novel insights into complex relationships and rare outcomes.

Our results align with Ethiopian and international studies. Tesfay et al20 reported that advanced maternal age significantly increases the risk of stillbirth, while Melaku et al21 found labour-related factors to be important. Similarly, Laikemariam et al22 identified a 1.58-fold higher risk of perinatal mortality among older mothers, and studies by Dongarwar et al23 and Avagliano et al24 showed that women aged ≥40 years face markedly higher risk. These findings reinforce the conclusion that maternal age is a critical determinant of stillbirth and highlight the need for enhanced antenatal monitoring and timely interventions in older mothers.

Labour and delivery characteristics also contributed substantially. Mode of labour and delivery mode were important predictors, consistent with reports by Melaku et al21 and Tufa et al,25 which showed that obstetric complications and instrumental deliveries were linked with poor birth outcomes. Maternal weight ranked highly in terms of Gini importance, suggesting that nutritional status influences stillbirth risk even if its effect on overall model accuracy was more modest. Gravidity also played a significant role, supporting previous findings that reproductive history shapes pregnancy outcomes.

Moderate contributors included number of ANC visits and development of complications, both of which are clinically meaningful. Adequate ANC has long been associated with improved pregnancy outcomes, while pregnancy complications are established risk factors for adverse events.25,27 Conversely, a history of pre-eclampsia, previous abortion and pregnant multiplicity contributed little to model performance, though they may still hold clinical relevance for individual patients.

Overall, the RF model emphasised maternal age as the dominant predictor, with labour characteristics, weight and gravidity also substantially influencing outcomes. While other covariates were less predictive in this dataset, they remain important from a clinical perspective. These results are consistent with both Ethiopian and global evidence20,28 and underscore the need for targeted monitoring and timely intervention for older mothers and those with high-risk labour characteristics to reduce the burden of stillbirth.

Limitations

Despite these insights, several limitations should be noted. First, the data were collected from a limited number of health facilities, which may restrict the generalisability of findings. Second, the use of observational, secondary data introduces potential issues of information bias, missing data and unmeasured confounding. Third, although the RF model identified important predictors, ML approaches do not establish causality, and clinically relevant variables may appear to have low predictive importance. Fourth, the relatively small number of stillbirth events could have affected model performance and reduced the stability of estimates, particularly for rare covariates. Fifth, important factors such as socioeconomic status, maternal nutrition and quality of ANC were not included, although they may substantially influence birth outcomes.

Future research should build on these findings by using larger, multicentre datasets and incorporating additional maternal and contextual factors. Models that rely solely on prenatal variables available before delivery may provide greater value for prospective, real-time risk prediction and early intervention in high-risk pregnancies.

Conclusions

This study demonstrates that maternal age is the most influential predictor of stillbirth in the Ethiopian context, followed by mode of labour, maternal weight, gravidity and delivery mode. Other variables, including the number of ANC visits and development of complications, contributed moderately, while factors such as history of pre-eclampsia, previous abortion and pregnant multiplicity provided minimal predictive value.

ML approaches, particularly RF, proved effective in identifying these determinants and offered interpretable insights through feature importance and SHAP analyses. To our knowledge, this is one of the first studies in Ethiopia to combine ML models with SHAP interpretation for stillbirth prediction, providing a novel, data-driven framework for understanding risk.

These findings support targeted prenatal and intrapartum interventions for older mothers and women with high-risk labour characteristics, which may help reduce the incidence of stillbirth. Future research incorporating additional maternal, socioeconomic and nutritional variables, and using larger, multicentre datasets, is recommended to further enhance predictive performance and generalisability.

Supplementary material

online supplemental file 1
bmjpo-9-1-s001.docx (1.5MB, docx)
DOI: 10.1136/bmjpo-2025-004000

Acknowledgements

The authors acknowledge the staff of Bishoftu General Hospital for their support in data collection and record management.

Footnotes

Funding: The authors have not declared a specific grant for this research from any funding agency in the public, commercial or not-for-profit sectors.

Provenance and peer review: Not commissioned; externally peer reviewed.

Patient consent for publication: Not applicable.

Ethics approval: Ethical approval for the study was obtained from the Research Ethical Committee of Bishoftu General Hospital, Bishoftu City, Ethiopia (Approval Number: N/C/S/C/0030/2015 E.C, dated 30 May 2023). All data were anonymised to protect patient confidentiality, and only deidentified data were used for analysis. The study adhered to the principles of the Declaration of Helsinki. Informed consent was not required for this study because it used secondary data that were fully anonymised before access. No identifiable personal information was used, and ethical clearance was obtained from the Bishoftu General Hospital ethical committee prior to analysis.

Data availability free text: The datasets used and analysed during the current study are available from the corresponding author on reasonable request.

Patient and public involvement: Patients and/or the public were not involved in the design, or conduct, or reporting, or dissemination plans of this research.

Data availability statement

Data are available on reasonable request.

References

  • 1.Chan GJ, Goddard FGB, Hunegnaw BM, et al. Estimates of Stillbirths, Neonatal Mortality, and Medically Vulnerable Live Births in Amhara, Ethiopia. JAMA Netw Open. 2022;5:e2218534. doi: 10.1001/jamanetworkopen.2022.18534. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Bosschieter TM, Xu Z, Lan H, et al. Using interpretable machine learning to predict maternal and fetal outcomes. arXiv. 2022 [Google Scholar]
  • 3.Ngusie HS, Tesfa GA, Taddese AA, et al. Predicting place of delivery choice among childbearing women in East Africa: a comparative analysis of advanced machine learning techniques. Front Public Health. 2024;12:1439320. doi: 10.3389/fpubh.2024.1439320. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 4.Moges WK, Tegegne AS, Mitku AA, et al. Causal machine learning models for predicting low birth weight in midwife-led continuity care intervention in North Shoa Zone, Ethiopia. BMC Med Inform Decis Mak. 2025;25:64. doi: 10.1186/s12911-025-02917-9. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Zelka MA, Yalew AW, Debelew GT. The effects of completion of continuum of care in maternal health services on adverse birth outcomes in Northwestern Ethiopia: a prospective follow-up study. Reprod Health. 2022;19:200. doi: 10.1186/s12978-022-01508-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Getaneh T, Asres A, Hiyaru T, et al. Adverse perinatal outcomes and its associated factors among adult and advanced maternal age pregnancy in Northwest Ethiopia. Sci Rep. 2021;11:14072. doi: 10.1038/s41598-021-93613-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.World Health Organization Newborn mortality. who fact sheet. 2023. https://www.who.int/news-room/fact-sheets/detail/newborn-mortality Available.
  • 8.Sliti HA, Rasheed AI, Tripathi S, et al. Incorporating machine learning and statistical methods to address maternal healthcare disparities in US: A systematic review. Int J Med Inform. 2025;200:105918. doi: 10.1016/j.ijmedinf.2025.105918. [DOI] [PubMed] [Google Scholar]
  • 9.Anteneh RM, Tesema GA, Lakew AM, et al. Development and validation of a risk score to predict adverse birth outcomes using maternal characteristics in northwest Ethiopia: a retrospective follow-up study. Front Glob Womens Health . 2024;5:1458457. doi: 10.3389/fgwh.2024.1458457. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Kebede SD, Walle AD, Mamo DN, et al. Leveraging machine learning to identify determinants of zero utilization of maternal continuum of care in Ethiopia: Insights from SHAP analysis and the 2019 mini DHS. PLOS Glob Public Health . 2025;5:e0004787. doi: 10.1371/journal.pgph.0004787. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Alene AA, Mengesha EW, Dagnew GW. Adverse fetal birth outcomes and its associated factors among mothers with premature rupture of membrane in Amhara region, Ethiopia. PLoS One. 2024;19:e0298319. doi: 10.1371/journal.pone.0298319. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Khadidos AO, Saleem F, Selvarajan S, et al. Ensemble machine learning framework for predicting maternal health risk during pregnancy. Sci Rep. 2024;14:21483. doi: 10.1038/s41598-024-71934-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Islam MN, Mustafina SN, Mahmud T, et al. Machine learning to predict pregnancy outcomes: a systematic review, synthesizing framework and future research agenda. BMC Pregnancy Childbirth. 2022;22:348. doi: 10.1186/s12884-022-04594-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Heuvel TL, Korte CL, Ginneken B. Automated interpretation of prenatal ultrasound using a predefined acquisition protocol in resource-limited countries. arXiv. 2019 [Google Scholar]
  • 15.Lunardon N, Menardi G, Torelli N. ROSE: a Package for Binary Imbalanced Learning. R J. 2014;6:79. doi: 10.32614/RJ-2014-008. [DOI] [Google Scholar]
  • 16.Arlot S, Celisse A. A survey of cross-validation procedures for model selection. Statist Surv. 2010;4 doi: 10.1214/09-SS054. [DOI] [Google Scholar]
  • 17.Saito T, Rehmsmeier M. The precision-recall plot is more informative than the ROC plot when evaluating binary classifiers on imbalanced datasets. PLoS One. 2015;10:e0118432. doi: 10.1371/journal.pone.0118432. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Suhas S, Manjunatha N, Kumar CN, et al. Firth’s penalized logistic regression: A superior approach for analysis of data from India’s National Mental Health Survey, 2016. Indian J Psychiatry. 2023;65:1208–13. doi: 10.4103/indianjpsychiatry.indianjpsychiatry_827_23. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 19.Heinze G, Ploner M, Dunkler D, et al. Package ‘logistf. 2025
  • 20.Tesfay N, Legesse F, Kebede M, et al. Determinants of stillbirth among reviewed perinatal deaths in Ethiopia. Front Pediatr. 2022;10:1030981. doi: 10.3389/fped.2022.1030981. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Melaku AG, Messelu MA, Alemayehu M, et al. Determinants of stillbirth among women who gave birth in public hospitals in Northwest Ethiopia, 2022. Matern Health Neonatol Perinatol. 2025;11:7. doi: 10.1186/s40748-024-00199-z. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Laikemariam M, Aklilu A, Waltengus F, et al. Adverse neonatal outcomes and associated factors among mothers who gave birth through induced and spontaneous labor in public hospitals of Awi zone, Northwest Ethiopia: a comparative cross-sectional study. BMC Pregnancy Childbirth. 2023;23:307. doi: 10.1186/s12884-023-05631-4. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Dongarwar D, Aggarwal A, Barning K, et al. Stillbirths among Advanced Maternal Age Women in the United States: 2003-2017. Int J MCH AIDS. 2020;9:153–6. doi: 10.21106/ijma.346. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 24.Avagliano L, Loghi M, D’Errico A, et al. Risk of stillbirth in older mothers: a specific delivery plan might be considered for prevention. The Journal of Maternal-Fetal & Neonatal Medicine . 2022;35:4137–41. doi: 10.1080/14767058.2020.1847075. [DOI] [PubMed] [Google Scholar]
  • 25.Tufa FA, Yilma D, Yadesa D, et al. Determinants of stillbirth among deliveries conducted at west Shoa zone public hospitals, central Ethiopia: a case-control study. BMC Pediatr. 2024;24:482. doi: 10.1186/s12887-024-04953-2. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Tesfa E, Nibret E, Gizaw ST, et al. Prevalence and determinants of hypertensive disorders of pregnancy in Ethiopia: A systematic review and meta-analysis. PLoS One. 2020;15:e0239048. doi: 10.1371/journal.pone.0239048. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 27.Regassa Y, Lemi H, Charkos TG. Determinants of stillbirth among mothers who gave birth at Bishoftu General Hospital, Ethiopia: using a Bayesian logistic regression model. Front Glob Womens Health . 2024;5:1441636. doi: 10.3389/fgwh.2024.1441636. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Rosenstein MG, Cheng YW, Snowden JM, et al. The risk of stillbirth and infant death stratified by gestational age in women with gestational diabetes. Am J Obstet Gynecol. 2012;206:309. doi: 10.1016/j.ajog.2012.01.014. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

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

    Supplementary Materials

    online supplemental file 1
    bmjpo-9-1-s001.docx (1.5MB, docx)
    DOI: 10.1136/bmjpo-2025-004000

    Data Availability Statement

    Data are available on reasonable request.


    Articles from BMJ Paediatrics Open are provided here courtesy of BMJ Publishing Group

    RESOURCES