In the mining industry, equipment failure is not just an inconvenience—it's a massive financial and safety risk. This project implements a Machine Learning-based Predictive Maintenance System designed to forecast machinery breakdowns using sensor data.
By analyzing operational metrics like torque, temperature, and rotational speed, our model predicts potential failures, enabling engineers to perform maintenance proactively rather than reactively.
Detailed Analysis: For a comprehensive breakdown of the theoretical framework, mathematical models, and exploratory data analysis, please refer to the Project Documentation.
Try the Live Demo: Mining Failure Predictor · Streamlit
We utilized the AI4I 2020 Predictive Maintenance Dataset from the UCI Machine Learning Repository. It reflects real-world industrial data with 10,000 data points.
| Feature | Unit | Description |
|---|---|---|
| Air Temperature | [K] | Ambient environmental temperature |
| Process Temperature | [K] | Internal machine temperature |
| Rotational Speed | [rpm] | Speed of moving parts |
| Torque | [Nm] | Mechanical force on the shaft |
| Tool Wear | [min] | Cumulative usage time of the tool |
| Type | L/M/H | Quality variant of the machine |
Target Variable: Machine failure (Binary: 0 = No Failure, 1 = Failure)
- Language: Python
- Data Manipulation: Pandas, NumPy
- Visualization: Matplotlib, Seaborn
- Machine Learning: Scikit-Learn, XGBoost, RandomForest
- Deployment: Streamlit
- Model Interpretation: Feature Importance & Confusion Matrices
- Preprocessing:
- Dropped irrelevant identifiers (
UDI,Product ID). - Encoded categorical variables (
Type) using Label Encoding. - Scaled continuous features using
StandardScaler.
- Dropped irrelevant identifiers (
- Handling Imbalance: Stratified train-test splits were used to handle the 96:4 class imbalance.
- Model Training:
- XGBoost Classifier (Gradient Boosting)
- Random Forest Classifier (Ensemble Bagging)
- Evaluation: Models were benchmarked using Accuracy, F1-Score, and ROC-AUC.
We achieved state-of-the-art results, with XGBoost slightly outperforming Random Forest in terms of stability and precision.
| Metric | XGBoost | Random Forest |
|---|---|---|
| Accuracy | 98.9% | 98.4% |
| ROC-AUC | 0.96 | 0.97 |
| Precision | 0.91 | 0.93 |
| Recall | 0.75 | 0.57 |
| F1-Score | 0.82 | 0.71 |
While the table above highlights the key performance indicators, the nuances of the model's performance—including confusion matrices, error analysis on false negatives, and feature importance rank plotting—are critical for understanding the model's reliability in a mining environment.
--> Click here to view the full Evaluation & Error Analysis in the Documentation
git clone [https://github.com/yourusername/mining-predictive-maintenance.git](https://github.com/yourusername/mining-predictive-maintenance.git)
cd mining-predictive-maintenancepip install -r requirements.txtstreamlit run app.pyTorque and Rotational Speed were identified as the most critical indicators of failure.
The model successfully identified the majority of failure cases with minimal false positives.
A user-friendly web interface for real-time predictions.
- Real-time IoT Integration: Connect model to live sensor feeds.
- Deep Learning: Experiment with LSTMs for time-series forecasting.
- Mobile App: Develop a mobile alert system for field engineers.
Achyant Shrivastava Department of Mining Engineering, IIT (BHU), Varanasi
“Predicting the future is hard, but preventing a failure is smart.”


