This repository explores the integration of Machine Learning with the Weibull Distribution to improve the accuracy of Remaining Useful Life (RUL) estimations. By treating the Weibull scale parameter (
Important Note on Execution: These projects were developed using Google Colab connected to a local Google Drive for dataset storage.
- Path Management: If you wish to run these notebooks locally or in another cloud environment, you must adjust the file paths in the data loading cells (e.g.,
pd.read_csv). - G-Drive Mounting: The code contains
drive.mount('/content/gdrive'). Replace this with local directory paths if you are not using Colab. - Dependencies: Run
pip install -r requirements.txtto install necessary libraries includinglifelines,xgboost,lightgbm, andscikit-learn.
The Weibull distribution is a versatile tool used to model the life cycle and failure rates of mechanical components.
The PDF represents the probability of failure occurring at a specific time
The CDF represents the cumulative probability that a component has failed by time
The Weibull Error Metrics was developed to evaluate performance of all machine learning models trained in this research. More on this is discussed on this Journal titled "Machine Learning for Covariate-Driven Changes in Weibull Scale Parameter".
- Weibull Error (WE)
$WE(t_i,\ \ \lambda,\ \ k)=t+\frac{2\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k},\left(\frac{t}{\lambda}\right)^k\right)-\frac{\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k}\right)$ $MWE=\frac{1}{n}\sum_{i=1}^{n}{WE(t_i,\ \ \lambda,\ \ k)}$
- Quadratic Weibull Error (QWE)
$QWE(t_i,\ \ \lambda,\ \ k)=t+\frac{2\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k},\left(\frac{t}{\lambda}\right)^k\right)-\frac{\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k}\right)+\frac{\lambda}{k2^{\frac{1}{k}}}\mathrm{\Gamma}\left(\frac{1}{k}\right)$ $MQWE=\frac{1}{n}\sum_{i=1}^{n}{QWE(t_i,\ \ \lambda,\ \ k)}$
- Right Weibull Error
$RWE(t_i,\ \ \lambda,\ \ k)=\frac{\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k},\left(\frac{t}{\lambda}\right)^k\right)$ $MRWE=\frac{1}{n}\sum_{i=1}^{n}{RWE(t_i,\ \ \lambda,\ \ k)}$
- Left Weibull Error
$LWE(t_i,\ \ \lambda,\ \ k)=t+\frac{\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k},\left(\frac{t}{\lambda}\right)^k\right)-\frac{\lambda}{k}\mathrm{\Gamma}\left(\frac{1}{k}\right)$ $MLWE=\frac{1}{n}\sum_{i=1}^{n}{LWE(t_i,\ \ \lambda,\ \ k)}$
Key Parameters:
-
$k$ (Shape): Determines the failure behavior (Infant mortality if$k<1$ , random if$k=1$ , and wear-out if$k>1$ ). -
$\lambda$ (Scale): Represents the characteristic life; the point in time where 63.2% of the units are expected to have failed.
the main objective of this study is to develop and apply machine learning on a Weibull Scale Parameter (
Based on the research: "A Comparative Analysis of Machine Learning Models for Aircraft Engine Remaining Useful Life Prediction."
- Objective: Comparative study of 12 unique preprocessing pipelines.
- Models: Linear Regression, XGBoost, and K-Nearest Neighbors (KNN).
- Datasets: NASA C-MAPSS (Turbofan Engine Degradation).
Based on the research: "Hybrid ML-Weibull Predictive Maintenance System for Dynamic Tire Remaining Useful Life Estimation."
-
Objective: Using an edge-cloud architecture to dynamically predict the Weibull
$\lambda$ parameter. - Hardware context: ESP32-S3 gateway capturing TPMS, OBD-II, and GPS data.
-
Innovation: Treating
$\lambda$ as a dynamic covariate influenced by real-time operational stressors.
predictive-maintenance-weibull-machine-learning/
- dir00-learning-weibull-distribution
- README.md
- nb00_probability_distribution.ipynb
- nb01_weibull_distribution.ipynb
- dir01-aircraft-engine-rul/
- CMAPPSData.zip
- README.md
- nb00_model_training.ipynb
- nb01_prediction_visualization.ipynb
- dir02-tire-degradation/
- datasets/
- vehicle_logs_rows.csv
- vehicle_logs_tread_14_1.csv
- vehicle_logs_tread_14_2.csv
- vehicle_logs_tread_21.csv
- vehicle_logs_tread_24_1.csv
- vehicle_logs_tread_24_2.csv
- README.md
- nb00_fix_sensor_reading.ipynb
- nb01_model_training_experimentation.ipynb
- nb02_model_training_evaluation.ipynb
- datasets/
- .gitignore
- requirements.txt
- README.md