Opportunity
Taimaka has treated over 30,000 malnourished children utilizing a highly cost-effective and innovative Community-Based Management of Acute Malnutrition (CMAM) model. Patients enroll in an Outpatient Therapeutic Program (OTP) for up to 14 weekly visits, aimed at restoring health and achieving target weight gain. Severe cases require critical stabilization in an Inpatient Therapeutic Program (ITP), an indispensable yet resource-intensive tier of care.
Since comprehensive admission and visit data are systematically recorded, a key strategic opportunity emerged: could predictive machine learning (ML) models analyze these clinical time-series data to optimize patient care and improve program efficiency? Deploying targeted ML algorithms empowers community mobilizers and field teams to proactively intervene—maximizing the clinical impact of OTP and ITP pathways, reducing patient mortality and morbidity, and driving higher recovery rates.
A central challenge in modeling outpatient malnutrition treatment is patient attrition, or loss to follow-up, across the 3- to 14-week care timeline. Because many children are lost to follow-up or are still in treatment, their final outcomes are unknown. In biostatistical terms, these records are right-censored. Mortality risk is also concentrated early: most deaths occur before a child’s second OTP visit. Accurate event classification requires advanced survival analysis techniques to prevent predictive bias caused by censoring.
Beyond raw risk prediction, our objective was threefold: ensure model transparency using Explainable AI (XAI) to articulate why specific risk probabilities were generated; compute predictions in near real time (within 24 hours of admission or weekly OTP updates); and deploy these insights securely via a low-cost virtual infrastructure and interactive web dashboard.
Our solution
In September 2024, Taimaka partnered with INFORMS Pro Bono Analytics to engineer predictive modeling frameworks for pediatric outcomes. Two specialized data science teams were established: one dedicated to predicting mortality risk, and the other to morbidity indicators, including acute medical complications, suboptimal weight gain, and low mid-upper arm circumference (MUAC) improvement. Could training datasets derived from Taimaka’s historical clinical records enable models that were not only highly accurate but fully interpretable for clinical decision-makers?
To classify morbidity risks, the morbidity team utilized Automated Machine Learning (AutoML) via AutoGluon, Amazon’s open-source AutoML library. AutoML streamlines complex workflows—including feature engineering, model selection, hyperparameter optimization, and ensemble stacking—enabling rapid development and scaling of robust predictive models. This automated modeling pipeline was subsequently extended from morbidity to mortality risk classification as well.
To address the statistical challenge of right-censored data within standard classification frameworks, the team implemented survival stacking, effectively allowing AutoML pipelines to handle censored time-to-event data appropriately.
Model training and validation were conducted in cloud-hosted Google Colab Python environments, leveraging generative AI coding tools to orchestrate and wrap custom extract, transform, load (ETL) pipelines around the AutoML framework.
In the deployment phase, automated nightly batch inference evaluates active patient records to compute updated risk scores, probabilities, and patient-level explanations. Custom Python ETL scripts process time-series data from the SQL database into a feature dataset optimized for inference. Operating on a cost-efficient DigitalOcean cloud server, the system outputs to a SQL database connected to Retool—a dynamic web platform accessible by field leadership and community mobilizers.
Explainable AI
Model interpretability is achieved using SHAP (SHapley Additive exPlanations), a game-theoretic framework that quantifies the contribution of each clinical feature to an individual patient's risk score. To bypass the cost and overhead of dedicated application servers, precomputed SHAP values are stored directly in the database. The frontend Retool dashboard leverages plotly.js to render interactive feature-attribution charts directly in field workers' browsers.
Temporal projections
While classification models answer the probability of an outcome, clinical teams also require temporal projections regarding when clinical events or trajectories will manifest. To provide a comprehensive analytical suite, three complementary model outputs were integrated:
Classification Models: Estimating overall risk probabilities for mortality and morbidity outcomes.
Survival Curves: Forecasting time-to-event trajectories over the course of treatment.
Anthropometric Forecasting: Projecting individual growth trajectories, including weight and MUAC gain.
Results
Across more than 1,000 clinical and demographic variables, feature importance analysis identified severe edema, recent ITP admission, and low weight-for-height z-score as the primary determinants of mortality risk. Additional significant predictors included clinical malaria diagnosis and slow height growth during treatment.
Impact
Deployed in active operations since July 2026, the machine learning system provides timely decision support. When the platform flags a patient with elevated risk of mortality, hospitalization, or non-response to treatment, Taimaka dispatches a community mobilizer for targeted household coaching and early clinical intervention. Field teams report that the system reliably flags high-risk children early enough to intervene.