The primary problem to address is predicting machine failures in the milling process. The challenge is to build a machine learning model that can accurately forecast when a machine will fail based on the given features. This is critical for maintenance scheduling, reducing downtime, improving productivity, and ensuring the quality of the products.
The proposed solution involves developing a predictive maintenance machine learning model, specifically a binary classification model, to forecast machine failures based on historical data from a milling machine. This classification task falls under supervised learning, as it will use labeled training data (where the outcomes are known) to learn the patterns associated with failures. Techniques such as Random Forest or Gradient Boosting, known for providing insights on feature importance, will be used. These insights can then inform maintenance decisions, leading to more effective failure prevention strategies.
- The dataset can be downloaded using command below
wget -O data/raw_data.csv https://raw.githubusercontent.com/Edoar-do/AI4I-Predictive-Maintenance/main/ai4i2020.csv
- Activate the virtual environment using the appropriate command for your operating system:
- Windows
.venv\Scripts\activate
- MacOS and Linux
source .venv/bin/activate
- Upgrade PIP first using this command
python -m pip install --upgrade pip
- Install packages using requirements.txt
pip install -r requirements.txt
- Deactivate the virtual environment (optional)
deactivate
Python 3.10.11
Here are the steps and commands to create a Docker image and run a Docker container:
- Open Terminal: First, you need to open a terminal on your machine.
- Navigate to Your Project Directory: Use the cd command to navigate to the directory containing your project files.
cd .\source\
- Build the Docker Image: You will use the docker build command to create an image. Replace your_image_name with the name you want to give your Docker image.
docker build -t your_image_name .
- Check the Image: After building the image, you can see it listed by running:
docker images
- Run the Docker Container: Now you can run a container from the image you just built. Replace your_container_name with the name you want to give your Docker container. Also, if your application needs specific ports to be open or environment variables, make sure to specify those with the -p and -e flags respectively.
docker run --name your_container_name -p 8080:8080 -d your_image_name
ML ZoomCamp Midterm Project
│
├───data
│ raw_data.csv
│
├───model
│ LogisticRegression_model.joblib
│ logistic_regression_model.joblib
│
├───notebook
│ EDA.ipynb
│ ML_model.ipynb
│
└───source
│ app.py
│ Dockerfile
│ logistic_regression_model.joblib
│ ml_pipeline.py
│ predict.py
│
└───modules
viz.py
- Problem Description
- EDA
- Model Training
- Exporting to Script
- Reproducibility
- Model Deployment
- Dependency and environment management
- Containerization
- Cloud Deployment