Machine learning sharpens the profile of unmet family planning need in Bangladesh
Unmet need for family planning in Bangladesh was examined through a machine-learning lens using BDHS 2022 data from 18,917 respondents. The analysis moved beyond a single regression framework and compared multinomial logistic regression, Random Forest, and XGBoost across unbalanced and balanced datasets, with the goal of separating women with no unmet need from those with unmet need for spacing or limiting. In a setting where contraceptive access and method choice are shaped by household structure, education, work status, and place of residence, the choice of model matters because the predictors interact rather than act in isolation.
The dataset itself reflects the scale of the public health problem. Table 1 distributed unmet need for family planning according to respondents’ characteristics in Bangladesh, while Fig 1 tracked the distribution of unmet need for contraception before and after class imbalance handling. That imbalance is not a trivial technicality; when one class dominates, a model can look accurate while missing the women most likely to require intervention. Balanced learning therefore becomes a clinical exercise in visibility, not just statistics.
Household structure, education, and residence emerged as central predictors
Feature selection with Boruta narrowed the field of candidate variables linked to unmet need for family planning. The Random Forest SHAP plot ranked predictors by their mean absolute contribution to model predictions, giving a practical map of the variables most influential in estimating unmet need. Among the named variables, women’s occupation, parity, women’s education, husband’s occupation, and residence stood out repeatedly in the visualizations.
A few patterns are especially important for program design. Women with 4 or more children appeared prominently in the feature-importance structure, while the mapping also included women with 0–1 children, indicating that parity was not a simple linear story. Education also carried weight, with primary and secondary schooling represented among the mapped categories, and residence—urban, rural, and the interaction between the two—featured directly in the SHAP dependence plots. In plain public health terms, the likelihood of unmet need is being shaped by whether women live in rural or urban settings, how many children they already have, and how social and economic roles constrain contraceptive decision-making.
Women who are not working and women engaged in agriculture appear in the predictor set as well. Those categories matter because employment is often a proxy for autonomy, mobility, and exposure to health information, all of which influence the ability to seek contraception consistently and negotiate use within a household. A woman’s contraceptive need is not determined by fertility status alone; it is filtered through access, bargaining power, and the social environment in which pregnancy decisions are made.
SHAP interactions point to place-based inequities in contraceptive need
The interaction plots in Fig 4 sharpened the picture further. Residence modified the relationship between unmet need and several predictors, including parity, wealth quintile, women’s education, and media exposure. Positive SHAP values marked factors increasing the model’s prediction of unmet need for family planning, while negative values marked the opposite. In other words, the same characteristic did not carry identical meaning in every setting; geography changed its contribution.
That is clinically and operationally important. A rural woman with low media exposure and limited education may face a different access barrier than an urban woman with the same parity, because the path from awareness to uptake is blocked at different points. The dependence plots suggest that program planners should not rely on a one-size-fits-all contraceptive strategy. They need interventions that reflect local service availability, communication channels, and household-level constraints.
Model comparison favored out-of-sample discrimination over simple fit
Performance evaluation across unbalanced and balanced datasets compared how the three models separated the multiclass outcome of no unmet need, unmet need for spacing, and unmet need for limiting. Fig 5 used stratified 10-fold cross-validation and plotted multiclass ROC curves for multinomial logistic regression, Random Forest, and XGBoost against the diagonal line of random chance. The result is less about a single headline winner than about whether flexible algorithms can outperform a conventional regression approach when relationships among predictors are nonlinear and interactive.
The ROC comparison is useful because family planning need is not binary in practice. A woman who needs spacing faces different counseling, timing, and method considerations than one who wants to limit births. By modeling those categories separately, the analysis acknowledges that the public health response should also be separated: postpartum counseling, long-acting reversible contraception, method switching, and male-partner engagement may not solve the same problem in the same way.
The public health value lies in targeting the women most likely to be missed
This study’s strength is the combination of nationally relevant survey data with interpretable machine-learning tools. SHAP methods make the model less opaque by translating prediction into variable-level contribution, which is exactly what health planners need when turning data into intervention priorities. Rather than treating unmet need as a broad national average, the analysis identifies the social and demographic profiles most likely to be left behind.
The remaining challenge is implementation. Predictive accuracy in a survey dataset does not automatically translate into better contraceptive uptake unless the health system can convert those signals into outreach, counseling, supply continuity, and culturally acceptable services. The article’s figures support a model-driven way to find risk patterns, but the bedside equivalent is community-level: identify women at risk of unmet need early, then ensure the contraceptive pathway is actually open when they seek it.