https://github.com/aun151214/predictive-maintenance-cmapss
Predictive Maintenance on NASA C-MAPSS dataset using LSTM, GRU, and Transformer architectures.
https://github.com/aun151214/predictive-maintenance-cmapss
cmapss deep-learning gru keras lstm machine-learning predictive-maintenance tensorflow transformer turbofan
Last synced: 27 days ago
JSON representation
Predictive Maintenance on NASA C-MAPSS dataset using LSTM, GRU, and Transformer architectures.
- Host: GitHub
- URL: https://github.com/aun151214/predictive-maintenance-cmapss
- Owner: aun151214
- License: mit
- Created: 2025-08-28T18:50:10.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-09-02T22:04:50.000Z (9 months ago)
- Last Synced: 2025-09-03T00:09:54.072Z (9 months ago)
- Topics: cmapss, deep-learning, gru, keras, lstm, machine-learning, predictive-maintenance, tensorflow, transformer, turbofan
- Language: Jupyter Notebook
- Homepage: https://www.linkedin.com/in/aunali-industrial-ai/
- Size: 11.9 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
π§ Predictive Maintenance with NASA C-MAPSS Dataset

   
This project implements predictive maintenance using the NASA C-MAPSS Turbofan Engine Degradation Datasets (FD001βFD004).
The goal is to predict the Remaining Useful Life (RUL) of engines before failure.
We benchmark multiple models, from classical ML to deep learning (LSTM, GRU, Transformer).
π Project Structure
predictive-maintenance-cmapss/
β
βββ data/
β βββ raw/ # Original C-MAPSS dataset (train/test/RUL txt files)
β βββ processed/ # Preprocessed pickles (.pkl) generated by preprocessing
β
βββ models/ # Saved trained models (.keras)
βββ results/ # Model evaluation outputs (CSV, plots, reports)
β βββ final_report.pdf # Auto-generated summary report
β βββ final_report.md # Markdown summary of results
β
βββ notebooks/ # Jupyter notebooks for exploration
β βββ 01_exploration.ipynb
β βββ 02_preprocessing.ipynb
β βββ 03_baseline_models.ipynb
β βββ 04_deep_learning_models.ipynb
β βββ 05_other_dl_models.ipynb
β βββ 07_transformer_fd001.ipynb
β
βββ src/ # Training, evaluation, preprocessing scripts
β βββ 02_preprocessing.py
β βββ train.py
β βββ evaluate.py
β βββ aggregate_results.py
β βββ utils.py
β
βββ run_all.bat # Full automation: preprocess β train β evaluate β report
βββ requirements.txt
βββ .gitignore
βββ README.md
π Results
Performance is reported across all four subsets (FD001βFD004):
| Model | Dataset | RMSE | MAE | RΒ² |
| ----------- | ------- | ------ | ----- | ------ |
| LSTM | FD001 | 63.61 | 50.67 | -0.358 |
| LSTM | FD002 | 68.73 | 54.47 | -0.339 |
| LSTM | FD003 | 87.25 | 63.52 | -0.162 |
| LSTM | FD004 | 102.05 | 76.52 | -0.311 |
| GRU | FD001 | 63.62 | 50.67 | -0.358 |
| GRU | FD002 | 68.37 | 54.17 | -0.325 |
| GRU | FD003 | 87.21 | 63.49 | -0.161 |
| GRU | FD004 | 102.11 | 76.57 | -0.313 |
| Transformer | FD001 | 47.59 | 36.94 | 0.240 |
| Transformer | FD002 | 52.94 | 41.11 | 0.206 |
| Transformer | FD003 | 69.67 | 53.07 | 0.259 |
| Transformer | FD004 | 80.61 | 59.30 | 0.182 |
π See the final_report.pdf for full details with tables & charts.
π₯ Dataset Setup
The dataset comes from NASAβs C-MAPSS Turbofan Engine Degradation Simulation.
π Download here: NASA Prognostics Data Repository
After downloading:
Extract files into data/raw/
data/raw/
βββ train_FD001.txt
βββ test_FD001.txt
βββ RUL_FD001.txt
βββ train_FD002.txt
βββ ...
Run preprocessing:
python src/02_preprocessing.py
This will generate .pkl files under data/processed/.
βοΈ Installation
# Clone repo
git clone https://github.com/aun151214/predictive-maintenance-cmapss.git
cd predictive-maintenance-cmapss
# Create environment
python -m venv .venv
.venv\Scripts\activate # Windows
# source .venv/bin/activate # Linux/Mac
# Install dependencies
pip install -r requirements.txt
π Usage
πΉ Train a Model
python src/train.py --model lstm --dataset FD001 --epochs 100 --batch_size 64
python src/train.py --model gru --dataset FD002 --epochs 100
python src/train.py --model transformer --dataset FD004 --epochs 100
πΉ Evaluate a Model
python src/evaluate.py --model lstm --dataset FD001
πΉ Run Full Pipeline (all models, all datasets, auto-report)
.\run_all.bat
This will:
Preprocess datasets
Train & evaluate all models on FD001βFD004
Save trained models in models/
Save results in results/
Auto-generate final_report.pdf & final_report.md
π Key Insights
Transformer performed best overall on FD001βFD004 (positive RΒ²).
LSTM and GRU underperformed on FD002βFD004 in this run, suggesting tuning/data augmentation needed.
Pipeline is fully automated β reproducible for any new dataset.
π License
This project is released under the MIT License.