Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Machine Failure Prediction with SHAP
|
| 3 |
+
emoji: 🤖🔧
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 4.12.0
|
| 8 |
+
python_version: 3.1
|
| 9 |
+
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
+
license: mit
|
| 12 |
+
language:
|
| 13 |
+
- en
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Machine Failure Prediction with Live SHAP Analysis
|
| 17 |
+
|
| 18 |
+
This application demonstrates a real-time machine failure prediction model. It allows users to interactively adjust machine parameters and see the immediate impact on the predicted failure probability.
|
| 19 |
+
|
| 20 |
+
## How it Works
|
| 21 |
+
|
| 22 |
+
The app uses a `RandomForestClassifier` model trained on a predictive maintenance dataset. For each prediction, it uses the **SHAP (SHapley Additive exPlanations)** library to explain the output.
|
| 23 |
+
|
| 24 |
+
- **Probability of Machine Failure**: The model's prediction of the likelihood that the machine will fail given the current input parameters.
|
| 25 |
+
- **SHAP Waterfall Plot**: This plot visualizes how each feature contributes to pushing the prediction away from the baseline (the average prediction) towards the final probability.
|
| 26 |
+
- <span style="color:red;">**Red bars**</span> show features that are increasing the probability of failure.
|
| 27 |
+
- <span style="color:blue;">**Blue bars**</span> show features that are decreasing the probability of failure.
|
| 28 |
+
|
| 29 |
+
## How to Use the Demo
|
| 30 |
+
|
| 31 |
+
1. **Adjust the Sliders**: Use the sliders and the dropdown on the left to change the input values for the machine's operational parameters.
|
| 32 |
+
2. **View Real-Time Results**: The "Probability of Machine Failure" and the SHAP plot on the right will update automatically.
|
| 33 |
+
3. **Interpret the Plot**: Observe how changing a feature (e.g., increasing 'Tool wear') changes its contribution (the size and color of its bar) in the SHAP plot.
|