jskswamy commited on
Commit
25c463a
·
verified ·
1 Parent(s): 3553773

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +24 -59
README.md CHANGED
@@ -1,94 +1,59 @@
1
  ---
2
  license: mit
3
  tags:
4
- - sklearn
5
  - predictive-maintenance
6
- - classification
 
7
  - adaboost
8
- datasets:
9
- - jskswamy/predictive-maintenance-data
10
- metrics:
11
- - f2
12
- - recall
13
- - accuracy
14
  ---
15
 
16
  # Predictive Maintenance Model
17
 
18
- ## Model Description
19
 
20
- This AdaBoost classifier predicts whether a diesel engine requires maintenance based on sensor readings.
21
- The model was trained for **commercial fleet predictive maintenance** applications.
22
 
23
- ## Metric Strategy
24
 
25
- **Two-stage approach:**
26
- 1. **Hyperparameter Tuning:** Balanced Accuracy (ensures genuine discrimination)
27
- 2. **Model Selection:** Recall (maximizes failure detection)
28
 
29
- For predictive maintenance, missing a failure is far more costly than a false alarm.
 
 
 
30
 
31
- ## Performance Metrics (Held-Out Test Set)
32
 
33
  | Metric | Value |
34
  |--------|-------|
35
- | **Recall** | **0.9978** |
36
- | F2 Score | 0.8942 |
37
- | Balanced Accuracy | 0.5026 |
38
- | ROC-AUC | 0.6957 |
39
- | Precision | 0.6317 |
40
-
41
- ## Features
42
-
43
- The model uses 6 engine sensor readings:
44
- 1. Engine RPM
45
- 2. Lub Oil Pressure
46
- 3. Fuel Pressure
47
- 4. Coolant Pressure
48
- 5. Lub Oil Temp
49
- 6. Coolant Temp
50
 
51
  ## Usage
52
 
53
  ```python
54
  import joblib
55
- import pandas as pd
56
  from huggingface_hub import hf_hub_download
57
 
58
- # Download model
59
  model_path = hf_hub_download(
60
  repo_id="jskswamy/predictive-maintenance-model",
61
  filename="best_model.joblib"
62
  )
63
  model = joblib.load(model_path)
64
-
65
- # Prepare input data (6 features)
66
- X_new = pd.DataFrame({
67
- 'Engine RPM': [800],
68
- 'Lub Oil Pressure': [3.5],
69
- 'Fuel Pressure': [6.0],
70
- 'Coolant Pressure': [2.5],
71
- 'Lub Oil Temp': [78],
72
- 'Coolant Temp': [80]
73
- })
74
-
75
- # Predict
76
- prediction = model.predict(X_new)
77
- probability = model.predict_proba(X_new)[:, 1]
78
-
79
- print(f"Prediction: {'Normal' if prediction[0] == 0 else 'Maintenance Required'}")
80
- print(f"Maintenance Probability: {probability[0]:.2%}")
81
  ```
82
 
83
- ## Training Details
84
 
85
- - **Algorithm:** AdaBoost
86
- - **Hyperparameter Tuning:** Optuna with 3-fold stratified CV
87
- - **Scoring:** Balanced Accuracy
88
- - **Split:** 75/10/15 (Train/Validation/Test)
89
- - **Training Data:** 14,651 samples
90
- - **Validation Data:** 1,953 samples
91
- - **Test Data:** 2,931 samples
92
 
93
  ## License
94
 
 
1
  ---
2
  license: mit
3
  tags:
 
4
  - predictive-maintenance
5
+ - tabular-classification
6
+ - sklearn
7
  - adaboost
8
+ pipeline_tag: tabular-classification
 
 
 
 
 
9
  ---
10
 
11
  # Predictive Maintenance Model
12
 
13
+ AdaBoost classifier for predicting engine maintenance needs based on sensor readings.
14
 
15
+ ## Model Description
 
16
 
17
+ This model predicts whether a diesel truck engine requires maintenance (1) or is operating normally (0) based on 6 sensor inputs. It uses an AdaBoost ensemble with Decision Tree base estimators, optimized for **maximum recall** to minimize missed failures.
18
 
19
+ ### Architecture
 
 
20
 
21
+ - **Algorithm:** AdaBoost Classifier
22
+ - **Base Estimator:** Decision Tree (max_depth=3)
23
+ - **Ensemble Size:** 383 estimators
24
+ - **Learning Rate:** 0.261
25
 
26
+ ## Performance
27
 
28
  | Metric | Value |
29
  |--------|-------|
30
+ | **Recall** | 99.78% |
31
+ | Precision | 63.2% |
32
+ | F2 Score | 0.917 |
33
+ | ROC-AUC | 0.70 |
34
+
35
+ **Threshold:** 0.316 (optimized for maximum recall)
 
 
 
 
 
 
 
 
 
36
 
37
  ## Usage
38
 
39
  ```python
40
  import joblib
 
41
  from huggingface_hub import hf_hub_download
42
 
 
43
  model_path = hf_hub_download(
44
  repo_id="jskswamy/predictive-maintenance-model",
45
  filename="best_model.joblib"
46
  )
47
  model = joblib.load(model_path)
48
+ prediction = model.predict_proba(features)[:, 1]
49
+ needs_maintenance = prediction > 0.316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  ```
51
 
52
+ ## Limitations
53
 
54
+ - Trained on Class 8 diesel truck data
55
+ - Requires all 6 sensor inputs
56
+ - Static prediction (no temporal patterns)
 
 
 
 
57
 
58
  ## License
59