This project builds an end-to-end machine learning system to predict machine failures using time-series sensor data from the NASA CMAPSS dataset.
The system forecasts failures in advance, enabling proactive maintenance and reducing downtime.
- Predict machine failure before it occurs
- Use time-series sensor data (temperature, pressure, vibration)
- Provide interactive visualization and analysis
- Time-series feature engineering (RUL calculation)
- Classification model using XGBoost
- Failure probability prediction
- Interactive Streamlit dashboard
- Per-engine analysis with trend visualization
- Dockerized for reproducible deployment
predictive-maintenance-ml/
│
├── data/
│ ├── raw/ # Original NASA dataset
│ └── processed/ # Cleaned and feature-engineered data
│
├── src/
│ ├── data_preprocessing.py # Data cleaning + RUL creation
│ ├── train_model.py # Model training
│ ├── evaluate_model.py # Evaluation metrics
│ ├── predict.py # Inference logic
│
├── models/
│ └── model.pkl # Trained model
│
├── dashboard/
│ └── app.py # Streamlit dashboard
│
├── Dockerfile # Container setup
├── requirements.txt # Dependencies
├── README.md # Project documentation
└── .gitignore
- Python (Pandas, NumPy)
- Scikit-learn
- XGBoost
- Streamlit
- Docker
pip install -r requirements.txt
streamlit run dashboard/app.py
docker run -p 8501:8501 predictive-maintenance
Then open: http://localhost:8501
- Upload dataset
- Predict failure probability
- View risky machines
- Engine-level analysis
- Failure trend visualization
The system evaluates engine health using a dual framework:
- Binary Failure Classification (Predicting whether an engine will fail within 30 cycles)
- Remaining Useful Life (RUL) Regression (Predicting exact remaining operating cycles)
- 🎯 Classification Metrics (Failure Risk):
- Accuracy: Measure of total overall correct predictions across all healthy and failing engines.
- Precision: Ratio of true positive failures out of all predicted failures (minimizes false alarms).
- Recall & F1-Score: Evaluates true failure detection rate and overall harmonic balance.
- 📈 Regression Metrics (RUL Forecasting):
- RMSE (Root Mean Squared Error): Measures standard deviation of prediction errors in operating cycles (penalizes large errors).
- MAE (Mean Absolute Error): Average absolute cycle difference between predicted and actual RUL.
- R² Score (Coefficient of Determination): Proportion of variance in RUL explained by engine sensor telemetry.
- The model predicts increasing failure probability and decreasing continuous RUL as the machine approaches end-of-life cycles.
- Containerized using Docker
- Can be deployed on:
- Streamlit Cloud
- Render
- AWS / GCP
- SHAP explainability
- Real-time IoT data streaming
- Multi-engine comparison dashboard
NIMALAN MANI M
Give it a star ⭐ on GitHub