Predictive Maintenance Model
Model Description
This Decision Tree classifier predicts whether a diesel engine requires maintenance based on sensor readings. The model was trained for commercial fleet predictive maintenance applications.
Primary Metric: F2 Score
The model is optimized for F2 Score (recall weighted 2x over precision) because in predictive maintenance:
- Missing a maintenance need (False Negative) leads to costly breakdowns
- A false alarm (False Positive) only results in an extra inspection
Performance Metrics
| Metric | Value |
|---|---|
| F2 Score | 0.8951 |
| Recall | 1.0000 |
| Precision | 0.6304 |
| F1 Score | 0.7733 |
| Accuracy | 0.6304 |
| ROC-AUC | 0.6255 |
Features
The model uses 6 engine sensor readings:
- Engine RPM
- Lub Oil Pressure
- Fuel Pressure
- Coolant Pressure
- Lub Oil Temp
- Coolant Temp
Usage
import joblib
import pandas as pd
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(
repo_id="jskswamy/predictive-maintenance-model",
filename="best_model.joblib"
)
model = joblib.load(model_path)
# Prepare input data (6 features)
X_new = pd.DataFrame({
'Engine RPM': [800],
'Lub Oil Pressure': [3.5],
'Fuel Pressure': [6.0],
'Coolant Pressure': [2.5],
'Lub Oil Temp': [78],
'Coolant Temp': [80]
})
# Predict
prediction = model.predict(X_new)
probability = model.predict_proba(X_new)[:, 1]
print(f"Prediction: {'Normal' if prediction[0] == 0 else 'Maintenance Required'}")
print(f"Maintenance Probability: {probability[0]:.2%}")
Training Details
- Algorithm: Decision Tree
- Hyperparameter Tuning: GridSearchCV with 5-fold stratified CV
- Scoring: F2 Score (beta=2)
- Training Data: 15,628 samples
- Test Data: 3,907 samples
License
MIT License
- Downloads last month
- -
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support