The problem
A process plant runs dozens of centrifugal pumps. When one fails unexpectedly, the line it feeds can stop. Bearings wear, impellers erode, cavitation chews the casing and seals start to leak. Each failure mode shows up differently in vibration, bearing temperature, discharge pressure, flow and motor current, usually days or weeks before the pump trips.
The difficulty is the other signals. A heatwave raises bearing temperature on every pump. A process upset swings pressure and flow. If an early-warning tool reacts to all of that, planners learn to ignore it within a week. So the real brief was two things: catch real failures early, and stay quiet when nothing is wrong.
Building the data honestly
I simulated three years of daily readings for 60 pumps. Each pump has its own baseline. Four failure modes develop over different time scales: bearing, impeller, cavitation and seal. I also added false precursors that look like trouble but aren't: heatwaves and process upsets.
From the raw readings I engineered ten features a reliability engineer would recognise:
- Vibration level, its 14-day trend and how spiky it is.
- Bearing temperature above that pump's own baseline, and its trend.
- Discharge pressure against the pump curve, and flow against its baseline.
- Motor current per unit of flow, which drifts as an impeller wears.
The label is simple: will this pump fail in the next 30 days?
The model
A gradient-boosted classifier, trained on years one and two and tested on year three, so it is always predicting a future it hasn't seen. I exported the trained trees to JSON, and the browser demo evaluates them itself. Its output matches scikit-learn to within 1e-8, so what you see in the demo is the real model, with no server needed.
The catch rate tops out near 79% for an honest reason: seal failures give almost no warning in these sensors. Rather than hide that, the product says it: the model card lists seal failures as a known blind spot.
Designing for the planner, not the data scientist
A probability isn't a decision. The maintenance planner needs to know which pump, how urgent, what is probably wrong, and what to do about it this week. Every part of the screen answers one of those.
A fleet list sorted by what needs doing
Pumps fall into Act now, Watch and Healthy. Watch never notifies anyone, to limit alert fatigue. It is only visible to people who go and look.
Time, not just risk
Next to the risk score is a range for days until it hits a limit. For pump P-204B the demo says 15–18 days; the simulated failure happens on day 13. A range is honest about uncertainty, and days are what a planner schedules in.
A recommendation that knows the plant
The advice depends on whether the pump has an installed spare. With a spare, operations start the standby pump and isolate the sick one, with no production loss. Without one, the job needs a planned stop, so the screen says to book the crew and parts now and agree the window with production. The planner can raise a work order, snooze with a reason, or mark it "not a problem", and that label goes into the next monthly retraining.
Why the model thinks this
Each bar shows how much lower the risk would be if that one signal were normal. It is a counterfactual explanation: it answers "what is driving this?" without asking the planner to read a model.
Looked at and ruled out
This is my favourite part. A box lists what the model saw and correctly ignored. For example: bearing temperature is up this week, but so is the air temperature, and corrected for that it is normal. Or flow is lower than usual, but pressure still sits on the pump curve, which points to a throttled valve rather than wear. Showing restraint is what earns trust for the alerts that do fire.
The raw evidence, one click away
Six linked sensor charts with alarm and trip lines, so an engineer can check the model's reasoning against the readings they already know.
A threshold you can reason about
A settings drawer has a threshold slider with recall and precision curves, a cost-per-month curve with a suggested threshold, and a model card. Choosing how sensitive the system is becomes a business decision with visible trade-offs, not a magic number.
The most important design decision was what the system stays quiet about.
Try it
Pick P-204B in the fleet list and follow the story from risk to recommendation.
What I'd do next
- Validate on real plant history, starting with the failure modes the simulation can't capture.
- Add an acoustic or oil-analysis signal for seals, the model's blind spot.
- Learn from planners' "not a problem" feedback to tune each pump's threshold.