Classification of Contraceptive Use among Women in Rwanda Using Machine Learning

Abstract Background Rwanda has experienced a dramatic increase in contraceptive prevalence, rising from 10% to 58% between 2005 and 2020. Despite this progress, the complex socio-demographic factors influencing contraceptive choice among Rwandan women remain incompletely characterised. Traditional statistical methods struggle to capture the nonlinear interactions inherent in survey data. Machine learning (ML) offers a data-driven alternative that may reveal hidden patterns and improve predictive performance. Methods Using data from the 2020 Rwanda Demographic and Health Survey (RDHS), we applied five supervised ML classifiers, namely Random Forest (RF), Logistic Regression (LR), Support Vector Machine (SVM), Decision Tree (DT), and K-Nearest Neighbours (KNN), to classify current contraceptive use among women of reproductive age (15–49 years). The dataset comprised 8,824 observations with 57 features following pre-processing. We used all 57 features for model training; we then applied permutation feature importance (threshold > 0.003) to the tuned Decision Tree model to identify the top ten predictors. Grid Search Cross-Validation (GridSearchCV) was applied for hyperparameter optimisation. Results Prior to hyperparameter tuning, RF achieved the highest accuracy (81%), followed by LR and SVM (79% each), DT (74%), and KNN (68%). Following GridSearchCV optimisation, RF remained the strongest classifier overall (accuracy: 81%, ROC-AUC: 0.90), while the tuned DT model showed the largest improvement and reached comparable performance (accuracy: 80%, precision: 0.82, recall: 0.80, F1: 0.80, ROC-AUC: 0.87). Key predictors identified included: decision-making on contraceptive non-use, number of living children, side-effect counselling, respondent's age, recent sexual activity, husband's desire for children, partner's age, and fertility preference. Conclusions Random Forest achieved the strongest overall performance for predicting contraceptive use in the Rwandan DHS context, while hyperparameter-tuned Decision Trees performed comparably with an interpretable model structure. Permutation-based feature importance reveals actionable predictors, specifically fertility-related factors, partner factors, contraceptive decision-making, and side-effect counselling, that should inform targeted family planning interventions. ML-based predictive models represent a valuable complement to conventional epidemiological tools for reproductive health programme planning.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-11-17
DOI
https://doi.org/10.21203/rs.3.rs-11361837/v1
Primary Topic
Reproductive Health and Contraception
Type
preprint

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Classification of Contraceptive Use among Women in Rwanda Using Machine Learning

Christine Niyizamwiyitira, Hodari Rubayita
6 links
Research Square
Reproductive Health and Contraception
preprint

Classification of Contraceptive Use among Women in Rwanda Using Machine Learning

Christine Niyizamwiyitira, Hodari Rubayita
preprint en

Abstract

Abstract Background Rwanda has experienced a dramatic increase in contraceptive prevalence, rising from 10% to 58% between 2005 and 2020. Despite this progress, the complex socio-demographic factors influencing contraceptive choice among Rwandan women remain incompletely characterised. Traditional statistical methods struggle to capture the nonlinear interactions inherent in survey data. Machine learning (ML) offers a data-driven alternative that may reveal hidden patterns and improve predictive performance. Methods Using data from the 2020 Rwanda Demographic and Health Survey (RDHS), we applied five supervised ML classifiers, namely Random Forest (RF), Logistic Regression (LR), Support Vector Machine (SVM), Decision Tree (DT), and K-Nearest Neighbours (KNN), to classify current contraceptive use among women of reproductive age (15–49 years). The dataset comprised 8,824 observations with 57 features following pre-processing. We used all 57 features for model training; we then applied permutation feature importance (threshold > 0.003) to the tuned Decision Tree model to identify the top ten predictors. Grid Search Cross-Validation (GridSearchCV) was applied for hyperparameter optimisation. Results Prior to hyperparameter tuning, RF achieved the highest accuracy (81%), followed by LR and SVM (79% each), DT (74%), and KNN (68%). Following GridSearchCV optimisation, RF remained the strongest classifier overall (accuracy: 81%, ROC-AUC: 0.90), while the tuned DT model showed the largest improvement and reached comparable performance (accuracy: 80%, precision: 0.82, recall: 0.80, F1: 0.80, ROC-AUC: 0.87). Key predictors identified included: decision-making on contraceptive non-use, number of living children, side-effect counselling, respondent's age, recent sexual activity, husband's desire for children, partner's age, and fertility preference. Conclusions Random Forest achieved the strongest overall performance for predicting contraceptive use in the Rwandan DHS context, while hyperparameter-tuned Decision Trees performed comparably with an interpretable model structure. Permutation-based feature importance reveals actionable predictors, specifically fertility-related factors, partner factors, contraceptive decision-making, and side-effect counselling, that should inform targeted family planning interventions. ML-based predictive models represent a valuable complement to conventional epidemiological tools for reproductive health programme planning.

Research Square
University of Rwanda (RW)
University of Rwanda
Good health and well-being, Gender equality
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