The telecom industry is growing rapidly due to consumers' increasing reliance on internet communication. This has created intense competition among telecom companies and ISPs, giving customers more choice. Customer Churn occurs when customers switch providers, leading to a decrease in revenue for the original provider. To address this, telecom companies must understand the drivers of Customer Churn, improve service quality, offer competitive pricing, and provide additional benefits to retain customers. Addressing Customer Churn is crucial for maintaining a competitive advantage and success in the telecom industry.
In response to the challenge of predicting customer churn in the telecom industry, a proposed machine learning solution aims to analyze customer behavior and patterns, helping telecom companies proactively identify potential churn and take preventive measures. This predictive approach is crucial for maintaining competitiveness in the rapidly evolving telecom sector.
The data is already provided in this repo, but you can download it using this command:
- training data:
wget -O data/customer_churn_train.csv https://raw.githubusercontent.com/adrn-mm/MLZoomCamp_Capstone1_Project/master/data/customer_churn_train.csv
- testing data:
wget -O data/customer_churn_test.csv https://raw.githubusercontent.com/adrn-mm/MLZoomCamp_Capstone1_Project/master/data/customer_churn_test.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 Capstone1 Project
│
├───.venv
│
├───data
│ customer_churn_test.csv
│ customer_churn_train.csv
│ customer_churn_train_preprocessed.csv
│
├───model
│ random_forest_model.pkl
│
├───notebook
│ data_prep.ipynb
│ EDA.ipynb
│ train.ipynb
│
└───source
customer_churn_test.csv
Dockerfile
predict.py
random_forest_model.joblib
train.py
- Problem Description
- EDA
- Model Training
- Exporting to Script
- Reproducibility
- Model Deployment
- Dependency and environment management
- Containerization
- Cloud Deployment