Back to Portfolio Research and App

PPG Predictor

Predicting Portal Pressure After a TIPS Procedure

My bachelor research at Erasmus MC, and the app I built on top of it. The study asked whether the portal pressure gradient after a TIPS procedure can be predicted from anatomy that is already visible on a CT scan taken before the operation. The app puts that model in front of the medical team, with every coefficient visible and editable.

In portal hypertension, usually caused by liver cirrhosis, the pressure gradient between the portal and hepatic veins rises. Above 10 mmHg it starts causing refractory ascites and variceal bleeding. When medication is not enough, a Transjugular Intrahepatic Portosystemic Shunt is the standard treatment. It works, but it carries a real risk of hepatic encephalopathy, so the question before the operation is how far the pressure will actually drop.

Models that answer this properly simulate blood flow through the patient's own vascular geometry. They are accurate and they take hours per patient, which means they are not available in the room where the decision is made.

The margin is narrow. Clinically significant portal hypertension starts at 10 mmHg and the target after the procedure sits around 12 mmHg, so the whole window between a stable patient and an acute one is about two millimetres of mercury. That is why we set the maximum acceptable error at 2 mmHg before we started.

A retrospective cohort at Erasmus MC of 453 patients, of which 144 met every inclusion criterion. Liver and spleen volumes were segmented automatically with TotalSegmentator in 3D Slicer, and vessel diameters were measured by hand following a standard protocol, with reproducibility checked between observers.

We built two models side by side: an interpretable linear regression and a tree based XGBoost model. Both were validated with a five by five nested cross validation and compared against a dummy regressor that simply predicts the mean.

The linear model reached a mean absolute error of 2.00 mmHg and met our threshold. But both models explained very little variance and sat close to the baseline. The conclusion was that static anatomical parameters are not sufficient to predict the pressure response after TIPS. What actually drives it, such as intrahepatic resistance, collateral circulation and vessel compliance, is not visible on a CT.

That is a negative result, and it is the part of this project I would defend first. Measuring your model honestly against a baseline and then writing down that it lost is the difference between research and advertising.

The model output only matters if the team can use it before the procedure. So instead of leaving it in a Python script, I built the prediction into an app: the inputs and the result on one screen, both models next to each other, and a clinical category for the predicted value.

Two decisions made it useful. The linear equation is editable inside the app, so a team can enter its own coefficients without touching the code. And both models share the same input definitions, so they can be compared directly on one screen. There is no machine learning library running at all, just readable arithmetic, which means every number on screen can be traced back to a coefficient you can see.

It is a decision support tool. The interpretation and the decision stay with the clinician.

The app showing the linear and XGBoost predictions side by side with a clinical category
Both models on one screen, with the clinical category and the number of variables entered. Values shown are synthetic.
The linear model screen listing the intercept and every variable coefficient in editable fields
Every coefficient from the study, visible and editable. No black box.

Open source, with the full study

The code, the models and the complete research report are public.

View on GitHub
First page of the research report on predicting portal pressure after TIPS

Research report ยท 69 pages

Patient specific prediction of portal pressure reduction after TIPS

The full study, published with the consent of every co author and both clinical supervisors. Method, cohort, both models, the nested cross validation, and the negative conclusion. Personal contact details have been removed; it contains no patient data.

Download PDF
Next Project HiNikki