The Application of Random Forest to Identify Determinants of Pregnancy Termination: A Comparison of Two Splitting Criteria

Background: The application of machine learning to medical and healthcare studies has increasingly gained attention in recent years. This paper employed a random forest (RF) model with two splitting criteria, namely the ‘Gini’ and ‘Hellinger distance’ and compared their performance via the out-of-bag (OOB) error. The model with the better performance was used to identify important factors that influence pregnancy termination amongst Tanzanian women. Methods: Data from the 2022 Tanzania Demographic Health Survey (TDHS) with a total weighted sample of 15,245 women aged 15–49 years was analyzed. A random forest model, which considers data with imbalanced classes for the outcome variable, was fitted. ALE plots were implemented to evaluate the factor effects. The Hellinger criterion was chosen for its effectiveness in addressing class imbalance, while ALE plots were employed to offer interpretable insights into the marginal effects of predictors, given the ‘black box’ nature of the RF model. Results: The prevalence of pregnancy termination amongst Tanzanian women was found to be 14.1% (95% CI: 13.5–14.7). The ALE plot suggested that women wanting children within 2 years, after 2 years, or are unsure about the timing have an increased risk of pregnancy termination compared to other categories, which are associated with reduced risk. Being married, living with a partner, divorced or widowed increased the risk of pregnancy termination, while being in a union or no longer living with a partner reduced pregnancy termination risk. Women with a secondary level of education are at a higher risk of terminating a pregnancy compared to other levels of education. Women from rich households have an increased risk of pregnancy termination compared to women from poor or middle-income households. Conclusions: The findings of this study highlight the need for initiating interventions aimed at reducing the rate of pregnancy termination amongst Tanzanian women. Women need to be educated about the use of contraceptive methods and encouraged to explore alternative methods to mitigate the negative outcomes of pregnancy termination.

Authors

Institutions

Publication Details

Journal
International Journal of Environmental Research and Public Health
Published
2026-11-30
DOI
https://doi.org/10.3390/ijerph23121476
Primary Topic
Reproductive Health and Contraception
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
article

The Application of Random Forest to Identify Determinants of Pregnancy Termination: A Comparison of Two Splitting Criteria

Henry Godwell Mwambi, Sizwe Vincent Mbona, Anisha Ananth, Retius Chifurira et al.
International Journal of Environmental Research and Public Health
Reproductive Health and Contraception
article

The Application of Random Forest to Identify Determinants of Pregnancy Termination: A Comparison of Two Splitting Criteria

Henry Godwell Mwambi, Sizwe Vincent Mbona, Anisha Ananth, Retius Chifurira, Bonginkosi Duncan Ndlovu, Shaun Ramroop
article en

Abstract

Background: The application of machine learning to medical and healthcare studies has increasingly gained attention in recent years. This paper employed a random forest (RF) model with two splitting criteria, namely the ‘Gini’ and ‘Hellinger distance’ and compared their performance via the out-of-bag (OOB) error. The model with the better performance was used to identify important factors that influence pregnancy termination amongst Tanzanian women. Methods: Data from the 2022 Tanzania Demographic Health Survey (TDHS) with a total weighted sample of 15,245 women aged 15–49 years was analyzed. A random forest model, which considers data with imbalanced classes for the outcome variable, was fitted. ALE plots were implemented to evaluate the factor effects. The Hellinger criterion was chosen for its effectiveness in addressing class imbalance, while ALE plots were employed to offer interpretable insights into the marginal effects of predictors, given the ‘black box’ nature of the RF model. Results: The prevalence of pregnancy termination amongst Tanzanian women was found to be 14.1% (95% CI: 13.5–14.7). The ALE plot suggested that women wanting children within 2 years, after 2 years, or are unsure about the timing have an increased risk of pregnancy termination compared to other categories, which are associated with reduced risk. Being married, living with a partner, divorced or widowed increased the risk of pregnancy termination, while being in a union or no longer living with a partner reduced pregnancy termination risk. Women with a secondary level of education are at a higher risk of terminating a pregnancy compared to other levels of education. Women from rich households have an increased risk of pregnancy termination compared to women from poor or middle-income households. Conclusions: The findings of this study highlight the need for initiating interventions aimed at reducing the rate of pregnancy termination amongst Tanzanian women. Women need to be educated about the use of contraceptive methods and encouraged to explore alternative methods to mitigate the negative outcomes of pregnancy termination.

International Journal of Environmental Research and Public HealthVol. 23(12)
Durban University of Technology (ZA), University of KwaZulu-Natal (ZA)
Reproductive Health and Contraception
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon