Johnny Hu Prosthetic joint infection pre-diagnosis
A model that produces a result
is not a model a hospital can use.
So I built it through to deployment.
The problem
Infection after joint replacement has to be judged before revision surgery,
from bloodwork and comorbidity indices rather than certainty.
An accurate model is necessary but not sufficient:
a clinician has to be able to see why it said what it said.
What it does
A stacking ensemble makes the prediction;
a Random Forest is then fitted to interpret it,
and the resulting decision rules are minimised until they are short enough to read.
SHAP values sit beside the result so a single case can be argued with,
not just accepted.
Getting it into a hospital
Flask front and back end, login, patient records, an interactive prediction page,
packaged in Docker so it can be stood up somewhere other than a laptop.
The rule minimisation is expensive — the app takes over two minutes to boot —
which is a cost worth paying once at startup rather than on every request.