In today’s highly competitive e-commerce landscape, businesses are constantly seeking innovative ways to attract customers and boost sales.
One powerful solution lies in the realm of data science, specifically in the implementation of a coupon recommendation system.
As a data scientist with a keen eye on business optimization, I embarked on a project to develop a coupon recommendation system designed to help businesses thrive in the digital marketplace.
The Business Challenge:
The challenge was clear: businesses often struggle to effectively engage customers and incentivize purchases. To address this challenge, I set out to harness the power of data science to create a coupon recommendation system tailored to businesses’ needs.
OBJECTIVE
The goal of this project is to develop a predictive model that can accurately forecast whether a customer will accept a coupon or not.
By leveraging advanced machine learning techniques and analyzing various customer attributes and purchase history, we aim to provide personalized coupon recommendations that maximize acceptance rates and drive sales.
FEATURES AND TARGET VARIABLE
- Target variable for this project is “Acceptance,” which indicates whether a customer accepted a given coupon or not. This variable serves as our outcome of interest and forms the basis for training and evaluating our predictive models.
- Features in this project helps the model to identify and predict whether the customer accept the coupon or not
- These features include temperature, weather, gender, coupons expiration, age etc.
- We are also provided user’s occupation and income
DATA PRE-PROCESSING
NULL values:
- There are so many null values in the dataset
- For example, 94% of the car column is null values, so we had to remove that column
- Whereas other columns with null values are objects, we dealt those column by replacing null values with the mode(most frequent element
DUPLICATE VALUES
- However, there were 291 duplicate values in the dataset
- As you can see in the image, we remove those duplicate columns as it will affect our model building afterwards
ENCODING
- So, this dataset required us to deal with different column differently,
- That’s why I used 3 different types of encoding techniques for different columns
Encoder |
Features |
One – Hot Encoder |
Destination , coupon, occupation |
Label Encoding |
expiration, gender |
Ordinal Encoder |
age, Bar, Coffeehouse, CarryAway, RestaurantLessThan20, Restaurant20To50 |
Multi-Collinearity
- I had used variance inflation factor method to check multi-collinearity
- As shown in the image, data has multi-collinearity problem as many variables having VIF more than 5
- So accordingly, I had removed several highly co-related columns
Feature Scaling
- Feature scaling has become the necessity as there are different range of data,
- and Scaling the data will help in the process of model building
Exploratory Data Analysis (EDA)
KEY POINTS
- Coupon having 1 day validity seems to work more
- Customers having age segment 21 or less than 21 could be our target audience
- People generally accept the coupon in sunny weather
- Mostly people with no acquaintances are accepting the coupon
- Lesser the distance from restaurant, better the acceptance rate
- Coupon acceptance rate is directly proportional to Restaurant, and inversely proportional to Coffehouse and bars
Model training
- I trained the model using Logistic Regression, Decision Tree, Random Forest, Bagging Classifier, SVM,KNN and Voting Classifier
- However, Random Forest and Bagging Classifier seems to more accurate models (as shown in the figure)
- But There is definitely OVERFITTING problem for the model
Performance Estimates
- I ran GridSearchCV() on Random Forest model for hypertuning and the reliability of the model
- Here are the results :
Final Insights and Recommendations:
- Prioritize coupon promotions for restaurants closer to the target customers’ locations
- Implement loyalty programs to reward frequent customers and encourage continued engagement
- Customize coupon campaigns for single individuals and consider their preferences.
- Develop coupon offers and promotions that cater to customers with lower educational backgrounds.
- Customize messaging and incentives to appeal to male customers.
- Align coupon promotions with favorable weather conditions to increase acceptance rates.
By incorporating these insights and following the recommendations, we can optimize our coupon acceptance prediction model and improve the effectiveness of your coupon campaigns.