Skip to content

Coupon Acceptance Analysis and Prediction with MLOps using MLflow and Flast API for AskmeOffers with a sample kaggle dataset.

Notifications You must be signed in to change notification settings

Revanth-Reddy-Pingala/AskmeOffers_Project

Repository files navigation

Coupuon Acceptance Analysis and Prediction with MLOps(Mlflow) for AskmeOffers

AskmeOffers sample Project

  • It's an End to End Project covering all the required steps in a Data Science Project with Web Interface.
  • Coded pipelines for every required stage of the lifecycle for this particular DS Project.
  • Deployable and Production Ready project.

Business Understanding:

Overview:

  • Coupon systems have been widely used to market products, and services and engage customers to use their products and services often. Coupons create a win-win situation for both companies and customers so, by offering a correct coupon to users, which can lead users to become frequent customers and it is enhancing a brand’s impact on its customers.

  • How to know which coupon to provide a customer can be a rather complex task, since each customer profile responds differently to each other, and frequently offering them bad coupons or deals might drag them away from your business. To overcome this problem, machine learning techniques can be used to build a better coupon recommendations system.

Business Objective:

  • Predicting whether the customer will accept the coupon or not is a difficult problem, and we can not just recommend it to everyone because of the costs concerned so, in this problem, we will predict whether a customer will accept or reject the offered coupon based on the customer’s profile and history.

  • This prediction helps the company in offering a correct coupon so that more customers will use their services which leads to more business for the company.

DS Objective:

  • The goal of the prediction problem is to predict whether a customer will accept or reject the coupon for a specific venue based on demographic and contextual attributes.
  • If the customers accept the coupon are labeled as Y=1 and if the customers reject the coupon are labeled as Y=0. This problem can be posed as a binary class classification problem.

Data

  • This is a sample dataset which is publicly available related to coupons.
  • Entire dataset description and detailed information about attributes can be found from this Colab Notebook

EDA, Feature Engineering and Models

  • Detailed EDA 1 Colab Notebook

  • Detailed EDA 2 Colab Notebook

Pipelines

  • Data Ingestion
  • Data Validation
  • Data Transformation
  • Model Trainer
  • Model Evaluation

Tech Stack Used

  • Python, Colab, Flask, Html, CSS, JavaScript
  • Dagshub, Mlflow, Conda virtual environment
  • VS Code, several Machine learning modules in Pythom

Workflows

  1. Update config.yaml
  2. Update schema.yaml
  3. Update params.yaml
  4. Update the entity
  5. Update the configuration manager in src config
  6. Update the components
  7. Update the pipeline
  8. Update the main.py
  9. Update the app.py

How to run?

STEPS:

Clone the repository

https://github.com/Revanth-Reddy-Pingala/AskmeOffers_Project

STEP 01- Create a conda environment after opening the repository

conda create -n aenv python=3.11 -y
conda activate aenv

STEP 02- install the requirements

pip install -r requirements.txt
# Finally run the following command
flask run 
or
python app.py

Now,

open up you local host and port

Dagshub Dagshub

MLFLOW_TRACKING_URI=https://dagshub.com/Revanth-Reddy-Pingala/AskmeOffers_Project.mlflow
MLFLOW_TRACKING_USERNAME=Revanth-Reddy-Pingala
MLFLOW_TRACKING_PASSWORD=your_password
python script.py

Run this to export as env variables:

export MLFLOW_TRACKING_URI=https://dagshub.com/Revanth-Reddy-Pingala/AskmeOffers_Project.mlflow

export MLFLOW_TRACKING_USERNAME=Revanth-Reddy-Pingala

export MLFLOW_TRACKING_PASSWORD=your_password

About MLflow

MLflow

  • Its Production Grade
  • Trace all of your expriements
  • Logging & tagging your model

Demo Screenshots

1 2 3 4

🔗 Connect with me

linkedin linkedin Youtube Blogger Instagram X

About

Coupon Acceptance Analysis and Prediction with MLOps using MLflow and Flast API for AskmeOffers with a sample kaggle dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published