Topics
A predictive-maintenance model can be statistically sophisticated and still fail in production because the dataset was assembled around the wrong event, the split leaked future information, or the alert threshold ignored maintenance capacity. The practical workflow is therefore not
It is
This article focuses on those implementation details.
Define the failure event first
A machine can “fail” in several operational senses:
- complete breakdown;
- component replacement;
- alarm threshold crossing;
- performance degradation;
- safety shutdown;
- technician-confirmed fault.
Those labels are not interchangeable. If the model is trained on replacements, but replacements sometimes occur preventively, the target is partly a maintenance-policy label rather than a pure physical-failure label. That distinction should be documented before any feature engineering begins.
Event time versus record time
Maintenance systems often contain several timestamps:
- physical event time;
- sensor timestamp;
- alarm timestamp;
- work-order creation;
- technician visit;
- replacement completion.
A feature available only after the work order was opened cannot be used to predict the event that triggered that work order. For prediction origin $t$, enforce
This single rule prevents a large fraction of predictive-maintenance leakage.
RUL labels are censored
If an asset is observed until time $C$ and has not failed, its true failure time $T$ is unknown. What we know is
That is right censoring. Dropping those assets wastes information. Assigning them a made-up RUL value invents information. Time-to-event models are often more defensible when a large fraction of the fleet has not yet failed.
Preventive maintenance creates informative missing futures
A successful maintenance program changes the future data. If a component is replaced because the model or technician noticed degradation, the failure that would have occurred is never observed. The label process therefore depends on prior intervention:
This makes historical labels policy-dependent. A model retrained on its own intervention history can gradually learn the maintenance policy as much as the physical failure process.
Construct windows around a forecast horizon
Suppose the operational question is:
Will this component fail within the next 7 days?
Then define
The feature window might use the previous 24 hours, 7 days, or another period. The horizon and look-back window should be chosen from the maintenance process, not from convenience. Different horizons create different problems. A 1-hour alert and a 30-day alert should not share one evaluation metric as though they were equivalent.
Repeated windows from the same asset are dependent
A single degradation trajectory can generate thousands of overlapping windows. Randomly splitting those rows into train and test sets causes leakage because adjacent windows share nearly all their sensor history. The split unit should usually be the asset, site, or future time block. For example:
Or for temporal deployment:
Baselines before complex models
Useful baselines include:
- last-value threshold;
- exponentially weighted moving statistic;
- logistic regression;
- Weibull or Cox survival model;
- simple state-space degradation model;
- change-point detector.
A neural network that does not beat a transparent reliability baseline under the deployment split has not justified its complexity.
Probability calibration matters
Suppose a model estimates
If predictions around 0.20 fail approximately 20% of the time under comparable conditions, the model is calibrated there. Maintenance decisions depend on probabilities, not only rankings. A high-AUC model can be poorly calibrated. Calibration curves, Brier score, and horizon-specific reliability should therefore accompany ranking metrics.
Alert thresholds are operational policies
The model score becomes a maintenance action only after thresholding. For threshold $\tau$,
Changing $\tau$ changes:
- false alarms;
- missed failures;
- lead time;
- technician workload;
- spare-parts demand;
- planned downtime.
The threshold should be optimized against operational cost or service constraints, not chosen from a generic 0.5 rule.
Evaluate alerts, not only windows
Window-level precision can exaggerate performance because one long degradation episode may produce dozens of true-positive windows. Event-level metrics ask:
- Was the failure detected at least once?
- How early was the first useful alert?
- How many separate false alert episodes occurred?
- How long did alarms persist?
These are closer to the maintenance experience.
Lead-time distribution
Let
A good system does not merely maximize $L$. Very early alerts can be too uncertain and create unnecessary maintenance. The useful lead-time interval is constrained by planning requirements. Report the full distribution of lead times for detected failures.
Cost-sensitive evaluation
A simplified expected operational cost can be written as
where the terms represent false alarms, missed failures, planned maintenance, and downtime. The values are organization-specific. That is precisely why one universal classification metric cannot select the deployment threshold.
Production monitoring
After deployment, monitor at least three layers.
Data quality
Track:
- missing sensor packets;
- timestamp delays;
- unit changes;
- firmware changes;
- impossible values;
- sensor replacement.
Model behavior
Track:
- score distribution;
- calibration when labels arrive;
- alert rate;
- lead time;
- subgroup performance.
Operational outcome
Track:
- unplanned downtime;
- maintenance workload;
- replacement rate;
- avoided failures;
- spare-parts consumption.
The third layer is the one that determines whether the system is useful.
Drift can be caused by maintenance success
Suppose a new maintenance policy removes a common failure mode. The model's input and outcome distributions will change. That is not necessarily model failure. It may be evidence that operations changed successfully. Retraining should therefore be triggered by diagnosis, not simply by a generic drift statistic crossing a threshold.
Versioning
A reproducible prediction should identify:
- model version;
- feature code version;
- sensor schema;
- training-data snapshot;
- threshold;
- calibration model;
- asset metadata;
- forecast horizon.
Without those, a historical alert cannot be reconstructed. This is particularly important in safety-critical maintenance.
Human feedback
Technician assessments are valuable labels, but they are not perfect truth. Technicians see the model's alerts and may be influenced by them. Feedback loops should therefore distinguish:
- independent inspection finding;
- model-triggered inspection;
- replacement decision;
- confirmed physical fault.
Otherwise the training label becomes contaminated by the model's own previous output.
Conclusion
Predictive maintenance in production is a statistical-decision system, not merely a classifier. The implementation chain is
Most production failures occur somewhere in that chain before the choice of algorithm becomes decisive.
References
- Jardine, A. K. S., Lin, D., & Banjevic, D. (2006). A review on machinery diagnostics and prognostics implementing condition-based maintenance. Mechanical Systems and Signal Processing, 20(7), 1483–1510.
- Si, X.-S., Wang, W., Hu, C.-H., & Zhou, D.-H. (2011). Remaining useful life estimation: A review on the statistical data driven approaches. European Journal of Operational Research, 213(1), 1–14.
- Lei, Y., Li, N., Guo, L., Li, N., Yan, T., & Lin, J. (2018). Machinery health prognostics: A systematic review from data acquisition to RUL prediction. Mechanical Systems and Signal Processing, 104, 799–834.
Embed interactive plots, widgets, and demos using <figure>, <iframe>, or <div class="interactive-embed"> containers. Ensure each embed includes descriptive captions for accessibility.
How to cite
Use the quick export buttons to save citations for reference managers or copy the formatted text directly.
Diogo Ribeiro (2020). Predictive Maintenance in Practice: Data, Validation, and Deployment. Faculty of Media Arts and Design, Technical University of Porto. https://diogoribeiro7.github.io/data-science/predictive_maintenance_data_science/.


