Upload README.md model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
---
|
| 3 |
+
tags:
|
| 4 |
+
- tabular-classification
|
| 5 |
+
- scikit-learn
|
| 6 |
+
- xgboost
|
| 7 |
+
metrics:
|
| 8 |
+
- accuracy
|
| 9 |
+
- f1
|
| 10 |
+
- precision
|
| 11 |
+
- recall
|
| 12 |
+
model-index:
|
| 13 |
+
- name: XGBoost Predictive Maintenance Model
|
| 14 |
+
results:
|
| 15 |
+
- task:
|
| 16 |
+
type: tabular-classification
|
| 17 |
+
name: Tabular Classification
|
| 18 |
+
dataset:
|
| 19 |
+
name: Engine Sensor Data
|
| 20 |
+
type: custom
|
| 21 |
+
metrics:
|
| 22 |
+
- type: accuracy
|
| 23 |
+
value: 0.6647
|
| 24 |
+
- type: precision
|
| 25 |
+
value: 0.6479
|
| 26 |
+
- type: recall
|
| 27 |
+
value: 0.6647
|
| 28 |
+
- type: f1
|
| 29 |
+
value: 0.6358
|
| 30 |
+
---
|
| 31 |
+
# XGBoost Predictive Maintenance Model
|
| 32 |
+
|
| 33 |
+
This model is an XGBoost Classifier trained to predict engine condition (healthy or failing) based on sensor data. It's part of a predictive maintenance system.
|
| 34 |
+
|
| 35 |
+
## Model Details
|
| 36 |
+
|
| 37 |
+
- **Model Type:** XGBoost Classifier
|
| 38 |
+
- **Task:** Binary Classification (Engine Condition: 0 = Healthy, 1 = Failing)
|
| 39 |
+
- **Best Parameters (from GridSearchCV):**
|
| 40 |
+
```json
|
| 41 |
+
{'objective': 'binary:logistic', 'base_score': None, 'booster': None, 'callbacks': None, 'colsample_bylevel': None, 'colsample_bynode': None, 'colsample_bytree': None, 'device': None, 'early_stopping_rounds': None, 'enable_categorical': False, 'eval_metric': 'logloss', 'feature_types': None, 'feature_weights': None, 'gamma': None, 'grow_policy': None, 'importance_type': None, 'interaction_constraints': None, 'learning_rate': 0.01, 'max_bin': None, 'max_cat_threshold': None, 'max_cat_to_onehot': None, 'max_delta_step': None, 'max_depth': 6, 'max_leaves': None, 'min_child_weight': None, 'missing': nan, 'monotone_constraints': None, 'multi_strategy': None, 'n_estimators': 200, 'n_jobs': None, 'num_parallel_tree': None, 'random_state': 42, 'reg_alpha': None, 'reg_lambda': None, 'sampling_method': None, 'scale_pos_weight': None, 'subsample': None, 'tree_method': None, 'validate_parameters': None, 'verbosity': None, 'use_label_encoder': False}
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Training Data
|
| 45 |
+
|
| 46 |
+
The model was trained on the `Engine Sensor Data` dataset, which includes various engine sensor readings such as RPM, oil pressure, fuel pressure, coolant pressure, and temperatures.
|
| 47 |
+
|
| 48 |
+
- **Features (X_train):** `X_train.csv` (scaled numerical features)
|
| 49 |
+
- **Target (y_train):** `y_train.csv` (Engine Condition)
|
| 50 |
+
|
| 51 |
+
## Evaluation Results
|
| 52 |
+
|
| 53 |
+
The model was evaluated on a held-out test set (`X_test.csv`, `y_test.csv`).
|
| 54 |
+
|
| 55 |
+
- **Accuracy:** 0.6647
|
| 56 |
+
- **Precision (weighted):** 0.6479
|
| 57 |
+
- **Recall (weighted):** 0.6647
|
| 58 |
+
- **F1-score (weighted):** 0.6358
|
| 59 |
+
|
| 60 |
+
## Usage
|
| 61 |
+
|
| 62 |
+
This model can be used to predict the `Engine Condition` for new engine sensor data. It was trained using `scikit-learn` and `xgboost` libraries.
|
| 63 |
+
|
| 64 |
+
To load and use the model:
|
| 65 |
+
|
| 66 |
+
```python
|
| 67 |
+
import joblib
|
| 68 |
+
|
| 69 |
+
# Load the model
|
| 70 |
+
model = joblib.load('best_xgboost_model.joblib')
|
| 71 |
+
|
| 72 |
+
# Make predictions (example with dummy data)
|
| 73 |
+
# from sklearn.preprocessing import StandardScaler
|
| 74 |
+
# scaler = StandardScaler()
|
| 75 |
+
# new_data = scaler.fit_transform([[750, 3.0, 7.0, 2.5, 78.0, 80.0]]) # Example scaled data matching training features
|
| 76 |
+
# prediction = model.predict(new_data)
|
| 77 |
+
# print("Predicted Engine Condition: [predicted value]") # Modified to avoid NameError
|
| 78 |
+
```
|