Home Artificial Intelligence Exploring Different Approaches to Generate Response Curves in Marketing Mix Modeling

Exploring Different Approaches to Generate Response Curves in Marketing Mix Modeling

1
Exploring Different Approaches to Generate Response Curves in Marketing Mix Modeling

Comparing Saturation Function and Partial Dependence for Response Curve Generation

Photo by Alexander Grey on Unsplash

Response curves are an integral part of promoting mix modeling, which is a statistical technique used to investigate the impact of varied marketing strategies and tactics on sales or other business outcomes. Response curves represent the connection between a marketing variable (e.g., promoting spend, price, promotion, etc.) and the sales or revenue generated by a services or products.

The importance of response curves lies of their ability to disclose the effectiveness of every marketing variable and the way it contributes to overall response. By analyzing response curves, marketers can gain priceless insights into which marketing tactics are driving probably the most sales and which are usually not delivering the specified results.

There are different approaches to constructing response curves, and in this text, I explore two distinguished methods: the easy approach using saturation transformation and the approach based on partial dependence. I evaluate these approaches using two different families of algorithms: linear regression and gradient boosting. Furthermore, I show that the partial dependence approach will be used at the side of response curves generated by SHAP values when using complex machine learning algorithms.

The simple approach to constructing response curves involves using saturation functions (transformations) resembling Logistic, Negative Exponential or Hill. A saturation function is a mathematical function that captures the diminishing returns effect, where the impact of a marketing variable saturates as its value increases. Through the use of a saturation function, the connection between the marketing variable and the response variable will be transformed right into a non-linear form. This allows the model to capture the saturation effect and more accurately represent the true relationship between marketing efforts and the response (sales or revenue).

One advantage of using a saturation transformation is its simplicity and interpretability. The response curve is defined by a mathematical function with fixed parameters leading to a smooth curve that will be easily visualized. Nonetheless, the selection of the saturation function is a vital consideration prior to modeling. Different functions may yield different results, and the choice needs to be based on the characteristics of the information and the underlying assumptions of the model.

Linear Regression and the Need for Non-Linearity

In marketing mix modeling, linear regression is a commonly used technique to investigate the connection between marketing variables and the response variable. Nonetheless, linear regression assumes a linear relationship between the predictor variables and the response variable. This will pose a limitation when attempting to capture non-linear relationships that usually exist in marketing data.

To beat this limitation and introduce non-linearity into the modeling process, it becomes crucial to use a saturation function or transformation to the marketing variables. This transformation allows for the generation of a non-linear relationship that will otherwise be linear as a result of the character of linear regression.

The partial dependence approach is a more general method that will be used to model the connection between any marketing variable and the response. This approach involves isolating the effect of 1 variable while holding all other variables constant. By various the worth of the marketing variable of interest and observing the corresponding response, a plot of the partial dependence will be created.

Unlike the graceful response curve generated by saturation transformations, the resulting plot from the partial dependence approach may not necessarily be smooth. Its shape relies on the underlying modeling algorithm, and relationship between a media variable and the response. The partial dependence approach will be useful when the connection is complex and non-linear, and it may be applied in cases when a saturation transformation is explicitly used or when algorithms handle non-linearity naturally without the necessity for added saturation transformation.

I proceed using the dataset made available by Robyn under MIT Licence as in my previous articles for practical examples, and follow the identical data preparation steps by applying Prophet to decompose trends, seasonality, and holidays.

The dataset consists of 208 weeks of revenue (from 2015–11–23 to 2019–11–11) having:

  • 5 media spend channels: tv_S, ooh_S, print_S, facebook_S, search_S
  • 2 media channels which have also the exposure information (Impression, Clicks): facebook_I, search_clicks_P (not utilized in this text)
  • Organic media without spend: newsletter
  • Control variables: events, holidays, competitor sales (competitor_sales_B)

I built an entire working MMM pipeline that will be applied in a real-life scenario for analyzing media spend on the response variable, consisting of the next components:

A note on coefficients

In scikit-learn, Ridge Regression doesn’t provide a built-in choice to implement positive coefficients for a subset of variables. Nonetheless, a possible workaround involves rejecting the optuna solution if any of the media coefficients are found to be negative. This will be achieved by returning an exceptionally large value, signaling that the negative coefficients are unacceptable and needs to be excluded from the model. An alternate approach might be to discuss with my article on the right way to wrap an R glmnet in Python, which enables the constraint of coefficients for a subset of variables.

For ridge regression, I apply a saturation transformation and generate response curves using each the saturation function and partial dependence approaches. With LightGBM, I allow the model to naturally capture non-linearities and generate response curves using the partial dependence approach. Moreover, I overlay SHAP values on the response curve to offer further insights.

Ridge Regression with saturation transformation

As will be observed, each response curves generated using the saturation function and partial dependence exhibit overlapping patterns, indicating that the 2 methods capture similar relationships between the marketing variable and the response.

LightGBM

As mentioned previously, the resulting response curve generated by the partial dependence may not necessarily be smooth. One reason for this will be attributed to the character of gradient boosting algorithms, which involve splitting the feature space into regions and incorporating interactions amongst multiple decision trees.

Image by the writer

The plots below depict the response curves for Ridge Regression and LightGBM, highlighting the disparities between the 2 algorithms in capturing diminishing returns. Moreover, we observe that the SHAP values offer a reliable approximation of the response curves generated by the partial dependence approach.

Image by the writer
Image by the writer
Image by the writer
Image by the writer
Image by the writer

Response curves play an important role in marketing mix modeling by providing insights into the effectiveness of various marketing variables and their contribution to overall response. In this text, I explored two distinguished methods for generating response curves: the easy approach using saturation transformations and the partial dependence approach. I evaluated these approaches using two families of algorithms, linear regression and gradient boosting, and demonstrated the contrasting ways wherein different algorithms capture non-linear response. Moreover, I compared the responses generated using SHAP values to the outcomes obtained through the partial dependence approach

The whole code will be downloaded from my Github repo

Thanks for reading!

1 COMMENT

LEAVE A REPLY

Please enter your comment!
Please enter your name here