File size: 2,046 Bytes
849c6d2 a033f13 849c6d2 a033f13 849c6d2 970f353 a033f13 849c6d2 a033f13 849c6d2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
---
license: mit
tags:
- sklearn
- predictive-maintenance
- classification
- adaboost
datasets:
- jskswamy/predictive-maintenance-data
metrics:
- f2
- recall
- accuracy
---
# Predictive Maintenance Model
## Model Description
This AdaBoost 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.6443 |
## Features
The model uses 6 engine sensor readings:
1. Engine RPM
2. Lub Oil Pressure
3. Fuel Pressure
4. Coolant Pressure
5. Lub Oil Temp
6. Coolant Temp
## Usage
```python
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:** AdaBoost
- **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
|