Machine learning guided postnatal gestational age assessment using new-born screening metabolomic data in South Asia and sub-Saharan Africa

Background Babies born early and/or small for gestational age in Low and Middle-income countries (LMICs) contribute substantially to global neonatal and infant mortality. Tracking this metric is critical at a population level for informed policy, advocacy, resources allocation and program evaluation and at an individual level for targeted care. Early prenatal ultrasound examination is not available in these settings, gestational age (GA) is estimated using new-born assessment, last menstrual period (LMP) recalls and birth weight, which are unreliable. Algorithms in developed settings, using metabolic screen data, provided GA estimates within 1–2 weeks of ultrasonography-based GA. We sought to leverage machine learning algorithms to improve accuracy and applicability of this approach to LMICs settings. Methods This study uses data from AMANHI-ACT, a prospective pregnancy cohorts in Asia and Africa where early pregnancy ultrasonography estimated GA and birth weight are available and metabolite screening data in a subset of 1318 new-borns were also available. We utilized this opportunity to develop machine learning (ML) algorithms. Random Forest Regressor was used where data was randomly split into model-building and model-testing dataset. Mean absolute error (MAE) and root mean square error (RMSE) were used to evaluate performance. Bootstrap procedures were used to estimate confidence intervals (CI) for RMSE and MAE. For pre-term birth identification ROC analysis with bootstrap and exact estimation of CI for area under curve (AUC) were performed. Results Overall model estimated GA had MAE of 5.2 days (95% CI 4.6–6.8), which was similar to performance in SGA, MAE 5.3 days (95% CI 4.6–6.2). GA was correctly estimated to within 1 week for 85.21% (95% CI 72.31–94.65). For preterm birth classification, AUC in ROC analysis was 98.1% (95% CI 96.0–99.0; p < 0.001). This model performed better than Iowa regression, AUC Difference 14.4% (95% CI 5–23.7; p = 0.002). Conclusions Machine learning algorithms and models applied to metabolomic gestational age dating offer a ladder of opportunity for providing accurate population-level gestational age estimates in LMICs settings. These findings also point to an opportunity for investigation of region-specific models, more focused feasible analyte models, and broad untargeted metabolome investigation. Supplementary Information The online version contains supplementary material available at 10.1186/s12884-021-04067-y.

Results: Overall model estimated GA had MAE of 5.2 days (95% CI 4.6-6.8), which was similar to performance in SGA, MAE 5.3 days (95% CI 4.6-6.2). GA was correctly estimated to within 1 week for 85.21% (95% CI 72. 31-94.65). For preterm birth classification, AUC in ROC analysis was 98.1% (95% CI 96.0-99.0; p < 0.001). This model performed better than Iowa regression, AUC Difference 14.4% (95% CI 5-23.7; p = 0.002). Conclusions: Machine learning algorithms and models applied to metabolomic gestational age dating offer a ladder of opportunity for providing accurate population-level gestational age estimates in LMICs settings. These findings also point to an opportunity for investigation of region-specific models, more focused feasible analyte models, and broad untargeted metabolome investigation.
Keywords: Pre-term births, Machine learning, Gestational age, New born screening Background Of 15 million preterm births annually, 90% happen in Low and Middle Income Countries (LMICs) [1,2] contributing to 1 million deaths < 5 years, 35% of deaths < 28 days [3]. Further 23.3 million infants (19.3% of live births) are born small for gestational age (SGA) in LMICs. Reduction by 10.0% in these would reduce neonatal deaths by 254,600 deaths [4]. Identifying and tracking this metric is therefore critical for advocacy, surveillance, research, evaluation of preventive strategies, and care of these high risk infants in LMICs. These in turn are essential to achieving United Nations Sustainable Development Goal 3 target 3.25 [2,5](elimination of preventable under-five deaths by 2030).
The estimation of accurate gestational age at birth is essential for identifying both preterm and SGA births. Early ultrasonography examination, considered as gold standard for gestational age (GA) assessment is unavailable due to high equipment cost and lack of trained manpower in most LMICs settings. Recall of last menstrual period (LMP) [6] used in these settings is unreliable in estimation of GA [7]. Postnatal methods, birth weight and standardized scoring system (Dubowitz or Ballard scales) have poor reliability and high inter user variability limiting their usage [8][9][10][11].
In global health a need for novel tools is required that could help monitor these metrics in LMIC countries on a population scale [12]. Algorithms developed in three North American settings using routine metabolic screen data to derive GA estimates, have been shown to provide accurate estimates to within 1-2 weeks of ultrasonography basedGA [13][14][15]. Limited data for external validity of these methods in LMIC populations [16,17] demonstrated satisfactory performance but lower accuracy for GA predictions especially among SGA new-borns in Africa and Asia. Reported publications used conventional statistical modelling approaches like linear/logistic regression and discriminant analysis. These statistical methods mainly focus on inference from fitting of a project-specific probability model [18]. Recent advances in Machine Learning (ML) techniques and big data analysis, allows for efficient handling of large numbers of predictors while incorporating non-linear association and complex interactions. ML techniques are more robust in nature and they mainly deal with the prediction of outcomes by using general-purpose learning algorithms to find patterns in a dataset without assumptions needed for conventional modelling. Recently, ML approaches has been shown to help preterm identification in hospital setting [19].
We hypothesized that application of ML to metabolite profile datasets of Alliance for Maternal and New-born Health Improvement (AMANHI) All children thrive (ACT) cohorts (representing both South Asia and Sub-Saharan Africa) would potentially improve the prediction of GA as compared to conventional approaches previously reported. The rationale for these cohorts and associated bio-bank procedures, and cohort characteristics have been described in previous publications [20,21]. One of the objectives of the AMANHI study was to develop and validate programmatically feasible approaches to accurately assess the gestational age of babies after they are born. Additionally this method will not be dependent on the North American population datasets for generation of equation coefficients and enable regional adjustments in the future. Among various ML classifiers, we chose to use random forest as particularly well suited for clinical predictions [22]. We report the performance of our machine learning based GA estimation algorithms.

Study population
This study was undertaken using data from the Alliance for Maternal and New-born Health Improvement (AMANHI) All children thrive (ACT), community based, prospective pregnancy and New-born cohorts from Pemba (Tanzania), Sylhet (Bangladesh) and Karachi (Pakistan). These studies received ethical approval from the local and institutional ethics committees of all the three sites: ICDDR, B and John Hopkins University for Bangladesh, Aga Khan University for Pakistan and ZAMREC for Tanzania. The protocols were also approved by the Ethical Review Committee (ERC) at World Health Organization (WHO). Briefly, women were enrolled in early pregnancy and followed through delivery and the postpartum period (supplementary Fig. 1). All pregnant women were eligible to participate in the study. Written informed consent was obtained from all participants prior to study enrolment for collection of maternal and new-born data and samples. GA was established by ultrasonography [23] at screening using the fetal crown rump length (if < 14 weeks gestation) [24] or biparietal diameter and femur length (if ≥14 weeks) [23,24]. All fetal biometry measurements were measured twice and then averaged for gestational age calculations [23,25]. Birth weight (5 g sensitivity) was measured using standard new-born weighing scale (SECA corporation, Columbia, MD).

Sample collection and processing
The metabolic screening data from 1283 samples used for this analysis was generated as part of the AMANHI collaboration with Department of Epidemiology, College of Public Health, University of Iowa, for evaluating external validity of the GA estimation methods developed based on American samples [13,17]. An overview is provided in consort flow diagram ( Fig. 1) and protocol process flow (supplementary Fig. 1). Heel prick blood spots were obtained on a protein saver card (Whatman R 903, GE healthcare, USA), within 24-72 h of birth from new-born's as per standard procedures. All 903 cards were labelled with barcoded unique identifier (ID's), were air-dried and stored in air tight Ziplock bags with desiccant at − 80°C. The 903 cards were shipped in dry ice to the University of Iowa where they were examined for quality. Then samples were sent to State Hygienic Laboratory, Ankeny, Iowa, USA at regular intervals (ensuring processing before potency window). Sixty-six metabolites (Supplementary Table 4) which included amino acid, acylcarnitines, enzymes and hormones were analysed using tandem mass spectrometry. Only singleton births (women who gave birth to only one child during a delivery, excluding twins, triplets) were included in the final analysis since analyte values are associated with birth status [26]. We excluded 35 non-singleton pregnancies in the final analysis.

Selection of the machine learning algorithm
For implementing the machine learning algorithms, the dataset was divided into training and test datasets. This selection was made without replacement. Training dataset used was derived by combining stratified sampling of 80% from Africa and Asia separately. A K fold cross validation method was used as resampling procedure to evaluate the machine learning algorithms which effectively performed a 10 fold cross validation, with three repeats [27]. Performance of the models was assessed by comparing RMSE and MAE values on the training dataset. Four ML algorithms considered appropriate for this analysis; artificial neural network (ANN), decision tree (DT), support vector machines (SVM) and random forest (RF) were evaluated and compared [28]. Amongst these RF regressor performed better and was selected for testing on test dataset (results provided in Supplementary Table 1).

Architecture of random Forest Regressor
ML models were generated using metabolite profiles along with birth weight and gender. RF regressor model for this analysis was built using 1) bootstrap sampling -with replacement and 2) Random feature -m = 10 in RF regressor. In this generation procedure was repeated until 10 decision trees were created to form a randomly generated "Forest". We denoted the hyper-parameters for RF regressor as "mtry" (a variable imputed in the model) at each split node for performing regression; the default value of "mtry" is p/3 where p is the number of predictors [29]. Random forest is an algorithm built by multiple decision trees. So it is important to choose the hyper-parameter as it defines how each tree will be built.

Implementation of random Forest Regressor
Sklearn.ensemble [30] (Random Forest Regressor package), a Python module was used for running the RF regressor. NumPy, Scipy and Pandas were used as python dependencies for running the module. R coding was used to create train and test datasets.

Models used for the analysis
Four different models were used for the prediction of Gestational Age. (Supplementary Table 3; details of variables in the models provided in Supplementary Table 4).
Model 1: only one variable per metabolite (for all 66 metabolites) from the profile of the blood metabolites along with birthweight and gender.
Model 2: was designed to replicate model published by Ryckman et al. [13] which included the linear, squared and cubic values of the metabolites as predictors.
Model 3: was designed to replicate the model published by Wilson et al. 2017 [15] which included the linear, squared and cubic values of the metabolites along with birthweight and gender as predictors.
Model 4 (selected Model): Contained all the predictors used in the above three models.

Best model selection
The best model was selected on the basis of root mean square error (RMSE) and mean absolute error (MAE).
The RMSE of a predicted model with respect to the estimated variable x model has been defined as the square root of the mean squared error [31].
Where, x obs is observed values, x model is modelled values at time i.
Mean absolute error (MAE) has been calculated as where x i is the prediction and y i is the true value.

Confidence intervals for RMSE and MAE
Efficient computation of RMSE, MAE values and 95% confidence interval were estimated using bootstrapped procedures [32] (Python package, (Bootstrapped0.0.2) https://pypi.org/project/bootstrapped/) and for t with a fixed seed number of 1 using boot [33] and metrics packages in R.
where c ranges over all possible criterion values. Graphically, J is the maximum vertical distance between the ROC curve and the diagonal line. Bootstrapped 95% CI for Youden index and its corresponding criterion value were estimated [37,38]. 95% CI for sensitivities and specificities were also estimated for a range of fixed and pre-specified sensitivities/specificities [33] and 95% CI estimated using bootstrapping [37,38]. Comparison of ROC curves estimating difference, confidence interval and p-value were also performed using bootstrap methods [39,40]. For the Bootstrap estimation a fixed seed was used to enable replication of the analysis.

General characteristic of the cohort
Data from all 1318 new-borns having new-born metabolic screen analytes were included in the current analysis. Of these 742 samples were from Africa and 576 from Asia (Pakistan and Bangladesh). Baseline characteristics of the sample are provided in Table 1. The distribution of male and female subjects in the cohort was almost in the ratio of 1: To evaluate impact of using a regionally trained algorithm (an important future prospect), we repeated the analysis with machine learning being trained by African sample for Africa estimations and Asian sample for Asia estimations. The model performance in spite of reduced samples for training improved both for Africa and Asia. The precision of MAE improved rather being reduced for Africa to 5 days (95% CI 4.1-6.0) and Asia to 4.8 days (95% CI 4.1-6.1) ( Table 2). The same pattern was seen for RMSE (Table 2).

Performance across gestational age categories
Estimation of RMSE and MAE as well as cross tabulation of actual and predicted GA by 2 weekly categories ( Table 3), indicated that the accuracy of the current set of analytes was diminishing only at < 35.

Discussion
This study has highlighted promising application of ML methodology to birth weight and new-born metabolomic screening data for improving postnatal prediction of gestation age at birth and discriminating between preterm and term new-borns. It also demonstrated ability of using LMICs data for training ML models and not needing external estimators from developed country datasets. In LMICs setting of South Asia and Sub-Saharan Africa, GA estimates from ML model were within an average of 5.2 days of ultrasonography based GA. The ML estimated GA enabled discrimination between pre-term and term births, AUC 98% was significantly better than regression estimated GA AUC 84%. The optimal criterion of ≤37 weeks providing a sensitivity of 100% and specificity of 92.616%.
As against lower performance of previous approaches [13,[15][16][17], in estimating GA in SGA sub population, our ML model estimates were within 5.3 days of ultrasonography based GA. This also reflected in the finding of a similar proportion with estimated gestation being within 1 week of the ultrasound confirmed gestation, 85.2% overall vs 83.9% in SGA subgroup. Use of data with 80% each of Asian and African data for training the *Bootstrapped, *Detailed description of the analytes used in the models have been given in supplementary information models, was associated with some variation in predictive accuracy for Asia (average of 5 days) compared to Africa (average of 5.2 days). Using region specific data for training reduced the variation to 4.8 and 4.9 days respectively and improved the precision in spite of reduced sample size of training dataset (Table 2). Being preliminary proof of principle, these findings provide a vision for future implementations, where in region specific training datasets may improve global application of metabolomics based data for gestational age assessment.
Our study had a number of important strengths and also some limitations which need consideration while interpreting the results. The strengths included 1) a sampling frame which utilized samples from both South Asia and East Africa, home to most of the global mortality associated with preterm and SGA births, 2) the study  design was nested in a well-described population-based cohort of pregnancy with WHO coordinated and harmonized protocols and SOP, 3) Active surveillance for early pregnancy identification with added measures (menstrual calendar, pregnancy), culminating in harmonized ultrasonography based gestation assessment between 8 and 19 weeks of gestation and 4) Sample collection, storage and shipment SOP based on pilot QC, resulting in high quality of samples. The primary limitation of this study is the participation bias against early preterm and early deaths before sample collection window. Relatively small proportion of actual births in this sub-sample limits our ability to comment on model performance in these sub-groups. Our finding of lower accuracy in preterm ≤34 weeks may either reflect lack of association of the metabolites in that sub-group, a function of lack of sample in that group and/or bias introduced by selective exclusion of early deaths. Additionally, we were working with the limitation of a smaller sample size as compared to the usual sample sizes in machine learning universe. We did try to use methods appropriate to accommodating smaller sample sizes, however would not have been protected against extreme chance affecting the sample. The ability to train the model and precision of estimates is somewhat reassuring but would need confirmation.
Preterm births and SGA account for a substantial burden of mortality in first 5 years [3,4]. Tracking these metrics is therefore critical for advocacy, allocation of resources, for surveillance, research, evaluation of preventive strategies, and care of these high-risk infants in low-and middle-income countries [3,41]. At the core of this is the estimation of gestational age at birth and being able to discriminate pre-term births accurately. Difference in GA at birth of a week impacts neonatal morbidity, mortality, and long-term outcomes significantly [42,43]. Our findings provide evidence that ML based gestational dating models improve upon the currently-used postnatal gestational age estimation methods [6,8,10,11,[13][14][15][16][17]. However while considering implementation of metabolic gestational dating approaches for robust population-level estimates, current challenges and future opportunities that machine learning brings to this domain need consideration. Heel prick samples for new-born screening are typically collected at least 24 h after birth to accommodate postpartum fluctuations in analyte levels. This introduces a bias due to early deaths selectively occurring in pre-term births, further in LMICs settings as most mother-infant pairs do not stay in hospital beyond 24 after delivery [44]. In most LMICs new-born screening is not a standard practice and will entail challenges in sample collection and processing for metabolic screening, therefore scale up needs to include rethinking about development of cordblood-specific models restricted to analytes less susceptible to fluctuations in the postnatal environment, establishing a profile of fewer selected metabolites that are measurable using less sophisticated equipment. While rethinking and investigating low-tech variations suitable to LMICs settings, also to consider are, newer high throughput trans proteome/metabolome platforms which are now becoming affordable (i.e. Seers Nano peptide technology [45]). An untargeted metabolomic approach may improve our ability to estimate GA postnatally while also identifying infants at risk of a variety Table 3 Performance and Concordance of predicted gestational age by actual gestation age group of conditions. Use of a broader spectrum of analytes may also help select a restrictive model for cord blood. Building on this study, use of ML methodology would positively influence development of all the above approaches, due to flexibility, ability to use regional data for ML and not requiring circling back to accumulating large datasets with new intended analyte profiles.

Summary
Towards implementing preterm birth surveillance initiatives [46] ML algorithms and models applied to metabolomic gestational age dating offer an opportunity ladder to provide accurate population-level gestational age estimates in LMICs settings. Further research should focus on application of ML enabling investigation and incorporation of region-specific models, evaluating broad untargeted metabolome or more focused feasible analyte pool with ML approaches. Derivation and optimization of cord blood metabolic profiles models predicting gestational age accurately would usher a new feasibility for use of this approach in LMICs settings.
Additional file 1: Fig. S1. Pregnancy cohort and Study design. Table  S1. Performance metrics of the different machine learning algorithms. Table S2. RMSE and Mean Abs Error in weeks obtained in three comparative models. Fig. S2. ROC analysis comparing discriminatory ability of four models evaluated. Table S3. Newborn screening metabolomic analytes estimated. Table S4A. Description of the model. Table S4B. Description of the model.

Acknowledgements
We acknowledge Sergey Feldman for his inputs regarding machine learning packages and algorithms and for reviewing initial analysis. We acknowledge the contribution of the AMANHI study teams in three countries and support of local participating institutions (Public Health Laboratory-IdC and Ministry of Health in Zanzibar, PROJAHNMOH Research Foundation in Sylhet, Bangladesh and Aga Khan University in Karachi, Pakistan). We sincerely thank all the mothers and families for their participation time and contributions to this study. We also thank the support of local health systems and ethical review boards for their oversite.
Authors' contributions a. SS, KR, AB, FJ, RB contributed to conceptualization, design and implementation, quality control, participated in analysis and interpretation of data. b. SS, S. Das, AD, RB Conceptualized Machine learning exercise and contributed to pooled data analysis and machine learning analysis. c. RK, IN, EJ, UD, contributed to the implementation, analysis and quality control in the field.d. KKR, EJ, BB, contributed to laboratory analysis of samples. e. UM, AD, NHC, AB, SR, S. Deb, SA, FK, RR, AM, SY contributed to field implementation, data collection and quality control. f. RB, AM, SY coordinated the study. g. SS, SDas, HM, AD additionally contributed to first draft write-up. h. All authors reviewed and contributed to manuscript writing. The author(s) read and approved the final manuscript.

Funding
The AMANHI study was funded by the Bill & Melinda Gates Foundation through a grant to the World Health Organization. Support for development of machine learning capacity at Pemba site was supported through platform grant from Bill & Melinda gates foundation. The funders have played no role in the drafting of the manuscript and the decision to submit for publication.

Availability of data and materials
The datasets used and/or analysed during the current study are available from the corresponding author on reasonable request.

Declarations
Ethics approval and consent to participate The study was performed in accordance with the ethical standards of the Declaration of Helsinki (1964) and its subsequent amendments. All study protocols for AMANHI cohorts were approved by appropriate institutional review board in each of the participating sites. ICDDR, B and John Hopkins University for Bangladesh, Aga Khan University for Pakistan and ZAMREC for Tanzania. The protocols were also approved by the Ethical Review Committee (ERC) at World Health Organization (WHO). Additionally, institutional/Local sample utilization committees approved shipment of samples to Iowa for metabolic screening assay. Written informed consent for ultrasonography and additional procedures was obtained from all participating mothers in their local or preferred language by study supervisors during enrolment. Mothers were asked for additional informed consent before obtaining a heel prick from the baby.