Skip to content

mehmetztrk/Predictive_Maintenance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ› οΈ Predictive Maintenance using Tree-based Models

This project builds a supervised machine learning pipeline to predict equipment failures using historical sensor data.
It includes complete steps from preprocessing to training and evaluation β€” all in a production-style modular setup.


πŸ“ Project Structure

predictive_maintenance/
β”‚
β”œβ”€β”€ data/                 # Raw and processed CSV files
β”œβ”€β”€ notebooks/            # EDA notebook
β”œβ”€β”€ scripts/              # Feature engineering, training, evaluation scripts
β”œβ”€β”€ models/               # Saved models (pkl)
β”œβ”€β”€ output/               # Evaluation outputs (plots & predictions)
β”œβ”€β”€ main.py               # One-click pipeline entry
β”œβ”€β”€ README.md             # Project description
└── requirements.txt      # Required packages

πŸ” Problem Statement

Can we predict if a machine is going to fail based on sensor readings like torque, temperature, and speed?

This project answers that by:

  • Engineering features from raw IoT-style telemetry data
  • Training tree-based models (Decision Tree, Random Forest)
  • Evaluating performance with accuracy, confusion matrix, and ROC-AUC
  • Visualizing model insights (feature importance)

πŸ“Š Dataset

  • Source: AI4I 2020 Predictive Maintenance Dataset
  • Size: ~10,000 samples
  • Features: Temperature, Speed, Torque, Tool wear, etc.
  • Label: Machine failure (0: No, 1: Yes)

βš™οΈ Technologies Used

  • Python 3.8
  • pandas, NumPy, matplotlib, seaborn
  • scikit-learn, joblib
  • ROC, AUC, confusion matrix, feature importance

πŸš€ How to Run

  1. Clone the repository
  2. Create a virtual environment & install requirements:
pip install -r requirements.txt
  1. Run the full pipeline:
python main.py

This will:

  • Preprocess the data
  • Train models
  • Generate evaluation outputs (in /output)

πŸ“ˆ Results

  • Random Forest Accuracy: 99.9%
  • Decision Tree Accuracy: 99.8%
  • Both models performed well; Random Forest showed better precision with fewer false positives.

πŸ”½ Outputs:

  • output/roc_curve.png
  • output/feature_importance.png
  • output/predictions.csv

🧠 Author

Mehmet Ozturk
Feel free to connect: GitHub


πŸ’¬ Feedback

Open to suggestions, ideas, and collaboration!
Follow the repo to stay updated with future ML projects. πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors