# PROS

> Pregnancy Risk & Outcome Stratification

- **Role:** Associate ML Scientist I
- **Company:** Wadhwani AI · Jhpiego
- **Period:** 2023 – 2024
- **Partners:** Jhpiego

Frontline nurses track hundreds of pregnancies at once. PROS reads visit history and flags who is likely to miss the next antenatal appointment, then ships the model as plain Java that runs on state health devices.

## Problem

Frontline nurses (ANMs) track hundreds of pregnancies at once. A static checklist cannot say who needs a phone call **this week**. PROS reads each woman's visit history and estimates how likely she is to miss her next antenatal appointment. The score appears inside the software health workers already use, as a prioritized follow-up list.

**Take home:** Shipped a **Java missed-visit risk scorer** to **Jhpiego** · promoted from **intern to Associate ML Scientist I** · first rollout in **Madhya Pradesh**.

- **650+** workers trained
- **6** pilot states
- **MP** first rollout

![PROS risk stratification UI in antenatal workflow](https://yashwardhan.space/assets/images/work/pros/pros-hero.webp)

*source: Wadhwani AI*

## Methods

### Getting the data right

- Pulled antenatal visit exports from state programs, visit dates, vitals, demographics, and whether past appointments were kept.
- Cleaned messy records: invalid codes, duplicate patient IDs, visits logged on impossible dates.
- Built review dashboards with **Jhpiego** to catch gaps in volume and field quality before we trained anything.

### Building the model

- Turned each pregnancy into a timeline, visits completed, days since the last check-up, vitals over time, prior missed visits.
- Trained a **tree-based model** to predict whether the next scheduled visit would be missed.
- Split data by patient cohort over time so test sets did not overlap with training pregnancies.
- Chose a risk cutoff with the program team so flagged cases matched how many follow-up calls ANMs could actually make.

### Explaining scores with SHAP

- Used **SHAP** to show which factors drove each risk score and which mattered most across the cohort.
- Reviewed results with **Jhpiego** and clinical partners, reworked features that did not hold up on the ground.
- Shared summary charts for sign-off before handing code to the software team.

![ANM using PROS during antenatal visit](https://yashwardhan.space/assets/images/work/pros/pros-anm.webp)

*source: Wadhwani AI*

## Deployment

State health systems could not run Python in the field. They needed the scorer as **Java on the JDK stack**, and we did not have a reliable ONNX path for our tree model at the time.

### From Python to Java

- Exported the trained model with **[m2cgen](https://github.com/Bayes-Intel/m2cgen)** into readable if-else Java the integration team could audit.
- Checked every test case against the Python training pipeline, scores had to match before **Jhpiego** could ship.
- Documented how each input field was encoded so the software team could reproduce scores in production.

### Rollout

- Worked with software engineering on alert hooks, colour-coded risk bands, and the prioritized due list.
- Pilot design with **Vaibhav Sapra** and **Harsh Vats**; **Mihir Kulkarni** led the ML work.
- After handoff, the module went live in **Madhya Pradesh**; other states followed.

![PROS pilot geography across Indian states](https://yashwardhan.space/assets/images/work/pros/pros-map.webp)

*source: Wadhwani AI*

## Team

- [Mihir Kulkarni](https://www.linkedin.com/in/mihir-kulkarni-11594aa2) (ML Scientist · team lead · Reporting manager)
- [Priyanshu Mahajan](https://www.linkedin.com/in/priyanshu-mahajan) (Associate ML Scientist I · ML team)
- [Vaibhav Sapra](https://www.linkedin.com/in/vaibhav-sapra-a3b95416b) (AI Product Manager · Product)
- [Harsh Vats](https://www.linkedin.com/in/harsh-vats-programofficer) (Associate Program Manager · Programs · MNCH)

## Impact

The scorer runs on state-provided devices during antenatal visits. Wadhwani AI reports **650+ frontline workers trained** across **six pilot states**, with **Madhya Pradesh** districts first.

- Owned the full path: clean data → model → SHAP review → Java handoff to Jhpiego
- Promoted from intern to **Associate ML Scientist I** when the module shipped
- Confirmed field use in **Madhya Pradesh** after delivery

## Sources

- [Wadhwani AI, PROS](https://www.wadhwaniai.org/impact/healthcare-solutions/pros/)
- [Jhpiego](https://www.jhpiego.org/)
- [m2cgen](https://github.com/Bayes-Intel/m2cgen)
- [SHAP](https://github.com/shap/shap)

---

[Back to portfolio](https://yashwardhan.space/) · [HTML case study](https://yashwardhan.space/work.html?p=pros)
