跳到正文
DEV Community· Senanur Çetin·· 33 分鐘前AI 評分41

AI4I 預測性維護:檢查 10% 設備可捕捉 94.1% 故障

A 10% review queue that catches 94.1% of failures: predictive maintenance on AI4I

AI 導讀

該預測性維護項目以感測器遙測資料建立排序檢查清單,檢查排名前 10% 的 200 部機器,可捕捉留出集內 94.1% 的故障,效果是隨機檢查策略的 9.4 倍。採用調整超參數及衍生特徵的 HistGradientBoosting 模型,PR-AUC 達 0.9019。AI4I 2020 是合成數據集;這是研究及示範項目,並非已部署的工廠服務。

正文

Maintenance and reliability teams often face the challenge of deciding which assets to inspect first when resources are limited. In this project, I developed a predictive-maintenance analytics pipeline that turns sensor telemetry into a ranked work queue.

The most concrete measured result is the review queue performance: reviewing the top 10% of assets (200 machines) captures 94.1% of all holdout failures. This represents a 9.4x lift over a random review strategy.

You can find the full implementation in the smart-factory-app repository.

Problem

Maintenance teams cannot review every asset equally. The goal was to determine if sensor telemetry could create a ranked work queue capturing most failures within a limited budget, expressed in terms of cost.

Approach

The project uses the UCI AI4I 2020 Predictive Maintenance Dataset. This dataset contains 10,000 records and a 3.39% failure rate. At this rate, accuracy is misleading; PR-AUC and recall are the evaluation signals used throughout.

The feature engineering phase involved creating three cross-sensor features to capture interaction effects:

  • mechanical_load: Torque x RPM.
  • thermal_stress: (Process temp - Air temp) / Air temp.
  • tool_wear_load_ratio: Tool wear / Torque.

These derived features alone contributed a PR-AUC increase of +0.077 compared to the raw feature set. For model selection, I benchmarked four models on the holdout using the raw feature set and default hyperparameters. HistGradientBoosting was selected because it achieved the highest PR-AUC and F1.

Results

The final HistGradientBoosting model, using tuned hyperparameters and derived features, achieved the following on the seed-42 80/20 holdout:

  • PR-AUC: 0.9019 (Baseline dummy: 0.034)
  • ROC-AUC: 0.9874 (Baseline dummy: 0.500)
  • Precision: 0.9273
  • Recall: 0.75
  • F1: 0.8293

To ensure validation robustness, the architecture was re-fit across five independent stratified 80/20 splits. This resulted in a mean PR-AUC of 0.880 ± 0.032.

In a separate study using the NASA C-MAPSS FD001 dataset for Remaining Useful Life (RUL) regression, the tuned model achieved an RMSE of 18.05 cycles. This is a 63.8% RMSE reduction compared to the naive median baseline of 49.82 cycles on NASA's official test protocol.

What it is not / Limitations

This is a research and demonstration project, not a deployed factory control or predictive-maintenance service. PLC/factory telemetry ingest is not enabled; the MQTT/OPC UA modules are offline validation code only.

AI4I 2020 is a synthetic dataset, so the metrics are benchmark results rather than plant-specific claims. Sensor, OEE, and line data on the dashboard are simulated. The risk score comes from the real trained model but is not a calibrated failure probability.

The dashboard RUL is a heuristic derived from the risk score, not the C-MAPSS regression model. Cost figures are illustrative; real maintenance economics vary by plant and equipment.

ECE and Brier score are descriptive on a single 2,000-row holdout and do not establish prospective calibration on real machines. Model selection and tuning both used the seed-42 holdout, so some selection bias remains.

RNF capture is 25% at the top-10% budget. Attributions use an interventional TreeExplainer with a 200-row background sample, which is an approximation of full-dataset Shapley values.

The BigQuery and Kaggle integration is offline code, a SQL plan, data contracts and mocked provider tests. Kaggle source versions, official raw-file checksums, BigQuery IAM/billing and a real upload have not been verified.

How to run

The project is available on GitHub: senanurcetin/smart-factory-app.

To run locally:

python -m venv .venv
# Windows:  .venv\Scripts\activate
# macOS/Linux:  source .venv/bin/activate
pip install -r requirements-dev.txt
python main.py   # then open the local address it prints

Alternatively, use Docker:

docker build -t smart-factory-app .
docker run -p 8080:8080 smart-factory-app   # port 8080

How do you typically handle the trade-off between precision and recall when defining maintenance review budgets in your industrial ML projects?

來源:DEV Community · dev.to