--- license: mit library_name: scikit-learn tags: [tabular-classification, predictive-maintenance, gradient-boosting, mlops] model-index: - name: engine-maintenance-classifier results: - task: {type: tabular-classification, name: Engine maintenance classification} metrics: - {type: recall, value: 0.8624} - {type: precision, value: 0.6845} - {type: f1, value: 0.7632} - {type: roc_auc, value: 0.7017} - {type: accuracy, value: 0.6627} --- # 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) 1. Engine_RPM 2. Lub_Oil_Pressure 3. Fuel_Pressure 4. Coolant_Pressure 5. Lub_Oil_Temperature 6. 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 ```python 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 - Streamlit Space: https://huggingface.co/spaces/imanandshah/engine-maintenance-app - GitHub: https://github.com/imanandshah/engine-predictive-maintenance - Dataset: https://huggingface.co/datasets/imanandshah/engine-predictive-maintenance