Engine Predictive Maintenance Classifier
Model purpose
Classifies the current condition of a vehicle engine — Normal or Needs Maintenance — from six standard on-board sensor readings. Decision-support / triage tool, not a time-to-failure forecast.
Input features (exact order)
- Engine_RPM
- Lub_Oil_Pressure
- Fuel_Pressure
- Coolant_Pressure
- Lub_Oil_Temperature
- Coolant_Temperature
Target convention
0 = Normal · 1 = Requires Maintenance (Faulty, positive class), per the Great Learning Capstone Project 3 problem statement.
Algorithm and pipeline
scikit-learn Pipeline: IQRCapper -> StandardScaler -> GradientBoostingClassifier. IQRCapper winsorises each feature at its 1.5×IQR fence, learned on training data only (leakage-safe); defined in the required preprocessing.py module.
Training dataset repository
https://huggingface.co/datasets/imanandshah/engine-predictive-maintenance (engine_data.csv, train.csv, test.csv)
Train/test split
80/20 stratified split of 19,535 de-duplicated records -> 15,628 train / 3,907 test, preserving ~63% Faulty / 37% Normal. random_state = 42.
Best parameters (GridSearchCV)
Six families compared with 5-fold stratified CV ROC-AUC; Gradient Boosting tuned across 24 combinations with 3-fold stratified CV optimising F1. learning_rate = 0.05 · max_depth = 2 · n_estimators = 120 · subsample = 1.0
Test metrics (held-out, positive class = Faulty)
Recall 0.8624 · Precision 0.6845 · F1 0.7632 · ROC-AUC 0.7017 · Accuracy 0.6627 · Balanced accuracy 0.5922 · Train accuracy 0.6774
Intended use
Prioritising / triaging engines by maintenance risk (rank order by predicted probability). Best for deciding inspection order, not a standalone pass/fail gate.
Limitations
- Judges current condition; does not predict a failure on a specific future date.
- Six sensors overlap heavily between classes -> moderate performance ceiling.
- No engine IDs or timestamps in the source data.
- Not a replacement for physical engineering inspection.
Required module
preprocessing.py (contains IQRCapper) must be importable to unpickle the pipeline.
Example: load and predict
import joblib, pandas as pd
from huggingface_hub import hf_hub_download
import preprocessing # noqa: F401
FEATURES = ["Engine_RPM","Lub_Oil_Pressure","Fuel_Pressure",
"Coolant_Pressure","Lub_Oil_Temperature","Coolant_Temperature"]
path = hf_hub_download(repo_id="imanandshah/engine-maintenance-classifier",
filename="engine_maintenance_pipeline.joblib")
model = joblib.load(path)
sample = pd.DataFrame([[746.0,3.16,6.20,2.17,76.82,78.35]], columns=FEATURES)
print(int(model.predict(sample)[0]), float(model.predict_proba(sample)[:,1][0]))
Model version
1.0.0
Links
Space using imanandshah/engine-maintenance-classifier 1
Evaluation results
- recallself-reported0.862
- precisionself-reported0.684
- f1self-reported0.763
- roc_aucself-reported0.702
- accuracyself-reported0.663