Failure check

Predicts near-term machine failure, tuned to maintenance economics. Built by Alvin Alias.

recall 91.2% / threshold 0.775

cost-optimal: a miss is $50K, a false alarm $2K

AA-2026-06
model waking, first run may take up to a minute

Operating point

Draws a real record from the AI4I test data. What actually happened to the machine stays hidden until the model commits.

Set the values yourself
waiting

failure probability

waiting for prediction
Why the threshold is 0.775

The default 0.5 threshold treats a $50,000 miss and a $2,000 false alarm as equal mistakes. Sweeping the threshold against those costs puts the optimum at 0.775 (note 2).

What moved this prediction

What moved this prediction

Calibration record · why 0.775 and not 0.5, in dollars
Recall 91.2% at threshold 0.77562 of 68 test-set failures caught, 6 missed, 83 false alarms
PR-AUC 0.841XGBoost with SMOTE and class weighting
ROC-AUC 0.979held-out test set
Baselinesrandom forest PR-AUC 0.820, logistic regression 0.455
Class balanceFailures are 3.4% of records; accuracy is meaningless here and is not reported
How it works · imbalance, SMOTE, threshold sweep

Failures are rare and expensive, so the work is in the imbalance and the economics: SMOTE plus class weighting for recall, then a threshold sweep that minimizes modeled total cost instead of maximizing F1; the strongest SHAP factors are torque, wear, and speed, which matches the mechanics.

Notes · the costs are modeled and stated in the open
  1. This ML demo sleeps after extended inactivity. First wake can take a moment; runs after that are quick.
  2. The $50,000 and $2,000 figures are modeled costs, chosen to represent unplanned downtime against a scheduled maintenance call; change the costs and the optimal threshold moves. The sweep is in the repo.
  3. Known records are drawn from the AI4I 2020 dataset with their recorded outcomes; misses and false alarms print as plainly as catches.
  4. This model classifies near-term failure; the turbofan page estimates remaining life. Same domain, different question.