Dual Master's in Industrial Engineering & Computer Science | Optimization, Data, Automation
Predicting Machine Operational States (Failure vs. Production) using Sensor & Maintenance Data
*Statistics & Data Analysis Course Project *
In industrial systems, unexpected machine failures lead to costly downtime. This project leverages real-world maintenance logs to build a Decision Tree classifier that predicts whether a machine is in Failure (0) or Production (1) mode - enabling proactive maintenance strategies.
Developed as part of a Statistics and Data Analysis course, this work bridges Industrial Engineering (reliability, operations) with Computer Science (machine learning, data pipelines).
Given sensor readings and operational features (e.g., Age, Pressure, Run_Hours, Sensor5), classify the machine’s current operational mode to support predictive maintenance decisions.
Maintenance_St.xlsx (353 samples, 13 features)Age, Machine_Type, Pressure, TemperatureEngine_Problem, Run_Hours, MaintenanceSensor1–Sensor5)Operation_modes (0 = Failure, 1 = Production)Sensor5 and Operation_modes show strong negative correlation: -0.81)sklearn)max_depth=3, min_samples_leaf=4, min_samples_split=2Sensor5, Age, Sensor2 most influential)| Metric | Score |
|---|---|
| Base Accuracy | 94.37% |
| Optimized Accuracy | 96% |
| Failure Recall | 98% (critical for maintenance!) |
| Key Features | Sensor5, Age, Sensor2 |
✅ Prediction for given input:
Age=55, Machine_Type=1, Pressure=140, ..., Sensor5=20 → Production (1) ✅
Clone this repo: ```bash git clone https://github.com/lewisndambiri/maintenance-mode-predictor.git cd maintenance-mode-predictor
Install dependencies: ```bash pip install -r requirements.txt
Launch Jupyter and run the notebook: ```bash jupyter notebook maintenance_analysis.ipynb
Note: The dataset Maintenance_St.xlsx must be in the same directory.
🛠️ Tech Stack
💡 Future Improvements
📄 License MIT License — see LICENSE for details.
Built by Lewis NDAMBIRI