We built ML models to optimize revenue through marketing by predicting whether there will be coupon redemption in a transaction or not.
at your ﬁngertips
What will work?
Who to target in their specific campaigns?
What is working?
Which campaigns are likely to succeed?
What has worked?
Which coupons should be revisited?
Increase customer loyalty
● Profiling the customers through
● Observe customer behavior
through Aggregation of features
● Comparing the performance
of campaigns through
Opportunity to Market: Purchasing Power
Get median purchase duration
Recommend a coupon at about the
same time they will be purchasing again
Make the product stickier
Underlying Magic: Feature Extraction
(getting high variance trees
from Random Forest)
Underlying Magic: Running K-means TWICE
Strong Positive Correlation
● brand vs item type
○ e.g. Packaged Meat
● brand vs campaign release date
○ Day of week
○ Month (seasonality)
● Integrating all datasets
● Feature Extraction
○ Effectively encoding categorical columns
○ Clustering and extracting features from what the trees say have
highest feature importance
● Dealing with missing variables
○ KNN impute
● High memory usage: Large number of rows = long processing time
○ Used SQL for queries
● Models tested: Random Forest, XGBoost, fast.ai
○ bootstrapped significantly: bagging principle
○ Fast iteration: we didn’t have a model that went through the entire dataset
○ All models were bootstrapped instances that were averaged out
○ fast.ai to ensure trees weren’t correlated to maximize the feature insights
○ L1 regularization does the trick
Insights and Recommendations
Factors affecting Success of Campaign
● Day of the week that promos come out have relatively significant effect
purchases and campaign came in
● There are shoppers that shop heavily on specific days
● Customers buy the same way
● Brand type released on certain dates (start of week, seasonality)
● Coupons that can be used for many items are redeemed more often
● Integrate Brand-level Categorical Variables
● Product Category Clustering: Looking at Price Sensitivities across Brands and
● Item code - Categories - Brand: Mapping and Analysis
● Matrix Factorization for Coupon Recommendation
● Collect data on profit per item (sales =/= profit) to effectively measure
profitability of the marketing campaign