Writing
Cost-Aware Predictive Maintenance for a Vehicle Fleet
An AI coursework project (LSBU, CSI_6_ARI) built around a question that plain accuracy can't answer: when a missed failure costs far more than a false alarm, what should the model actually optimise for?
The system predicts vehicle failures for a fleet, working from 170 anonymised sensor readings per vehicle across a dataset with a 1.66% failure rate — severely imbalanced, the same "predict the majority class and score well" trap as most real fault-detection problems.
Benchmarking against cost, not accuracy
I preprocessed with median imputation and variance filtering, then benchmarked Gradient Boosting, an MLP and Random Forest. Instead of comparing them on accuracy or F1, I evaluated against the actual business cost: £10 per false positive, £500 per false negative. That reframes model selection entirely — the "best" model is the one with the lowest expected cost, at a decision threshold tuned for that cost ratio rather than left at 0.5.
The champion MLP reached 95% recall at its cost-calibrated threshold — accepting more false alarms on purpose, because each one is cheap and each missed failure is not.
From prediction to decision
A probability isn't an action. On top of the model I built a lightweight decision-support agent that maps failure probability to one of three responses — continue monitoring, schedule an inspection, or intervene immediately — so the output is something a maintenance team can act on directly.
What I took from it
Cost-sensitive thinking. Once you write down what each type of error actually costs, a lot of the usual ML defaults — 0.5 thresholds, accuracy comparisons, balanced-class assumptions — stop making sense, and the modelling decisions start to follow from the economics.
Full code on GitHub.
← All writing