Selling Prediction on multi channel, Data science #1
Zsolt Szalay
Certified Magento, NextJS, Laravel, AI (RAG, Fine Tuning), Microservices, Integrations, SEO, PHP, Python, Project Planning
How you can measure efficiency of a marketing campaign even when there is a multi channel selling model? And how you can predict sales for the next campaign? Let me ask this on a different way: How you can find the best fit of incensement on ad when you run multi-selling channels?
In the e-commerce industry and in the Magento world (or in any e-commerce platform) very common situation when Business runs multi-channel marketing campaigns.
How you can do a valuable selling prediction for your next marketing campaign?
This question sounds simple but can be very complex in detail even if you want to make your sales prediction as accurate as possible. You also want your prediction be more accurate over time.
The answer is Machine Learning
You can use your math on your data set what is great and it has it's own place. Let me just say a summary or an average never gives you a correct or even more accurate prediction. To understand such a complex events like a campaign you will need more than simple math. You will need data science and more likely Machine Learning.
This sounds very technical but this is the right way to have a better understanding of your customers and/or campaigns. I am very glad to see there are more and more companies who spend more attention on data science and start to grow.
If you are not afraid from the big words like “data science” and “machine learning” then you are ready to break down your needs and start to work this out.
Learn form your own data
With machine learning your analysis model will learn and will provide more accurate and personalized result (prediction, recommendation) over time then a static system. You can find patterns to get better prediction based on your own data over time.
This is the reason why big companies have started to use machine learning everywhere. Amazon, YouTube, EBAY, Netflix and all big companies want to give you more personalized and more accurate recommendation and even get more accurate prediction for future marketing campaigns.
What this means?
Let’s suppose you have an e-commerce website where you sell your products and you want
- to understand and know the efficiency of your campaign(s),
- to do sales prediction
- to know the error rate.
Train your data analysis system
First you want to collect data to show it to your data analysis system to teach it about your campaigns and your personal business. More data means more examples what gives you more accurate prediction. If you have only some because you are a startup then just keep adding data to your system then it will learn more and will be more accurate in the future.
Choose a Data Analysis Model
There are so many different models but linear regression is the most widely used of all statistical techniques. It’s really fast and easy to extend the data set behind that. Simple to implement and gives you useful and understandable picture about your marketing champagne or your customer’s behaving.
So your keywords are:
- Machine Learning {ML},
- Linear Regression Model,
- Prediction,
- MAE (Mean Absolute Error),
- MSE (Mean Squared Error),
- RMSE (Root Mean Squared Error).
Keep in mind in some case your business needs different and more sophisticated data analysis model.
Linear regression assumes a linear relation between your past data and future prediction.
Machine Learning {ML}
When you implement {ML} then “a” and “b” in the linear regression equation are “learned” during the steps of model. Then the teached model can be used for PREDICTION.
With this method you use your exist data to train your model to get the best fit of prediction of Sales.
Wikipedia: https://en.wikipedia.org/wiki/Machine_learning
Linear regression and an example
Pros:
- FAST (this can be important when your data set is growing)
- no tuning required,
- highly interpretable,
- well-understood
Cons:
- less predictive accuracy because in real life relationship is not linear as this model assumes
Equation of linear regression
This is really just for accuracy and you can skip.
Y = a0 + b0*X0 + a1 + b1*X1 + … + an + bn*Xn
Where
- Y is the dependent variable (that's the variable that goes on the Y axis),
- X is the independent variable (i.e. it is plotted on the X axis),
- b is the slope of the line and
- a is the y-intercept
- n is number of features (YouTube, Facebook, Twitter in my case = 3)
In my case the equation is
Y = a0 + b0* YouTube + a1 + b1*Facebook + a3 + b3*Twitter
Please notice that all of my three sale channels are there in the formula what means the calculated sales depends on them
Wikipedia: https://en.wikipedia.org/wiki/Simple_linear_regression
The bottom line just again, linear regression assumes linear relationship between observations and variables.
How your trained model tells you the coefficient of each channel?
Each sales channel has it's own coefficient value what defines the number of investment of sold products based on a unit investment on your campaign.
With other words a given amount of YouTube and Facebook ad spending, a “unit” increase in Twitter ad spending is associated with Twitter’s coefficient “unit” increase in Sales.
How linear regression looks like?
Basically your data is about the cost of the campaign in different advertisement channels like YouTube, Facebook, Twitter and the number of result as Sales (sold products).
This means you have observations where your advertisement channels represent features in the model. Each line represents an observation and this is exactly what you want to use to train your model.
In my case with other words the number of the sold products is a result of a campaign in each row. You can visualize your sales per channel on easy way and you will get something like these diagrams:
You need to find the best fit line
Once you get your data set and displayed them separately then you can do the regression to get the best fitting line what is really just the SUM of squared vertical distances with lowest error rate between each points and the line. After when your model has been trained with your campaigns then your model will give you a prediction based on previous advertisement costs and sales result.
To get the most accurate prediction you will need to find the BEST FIT line. Then as best fit has been learned then it could be used for sales prediction.
Magento Business Intelligent
I did not have a chance to have a look on Magento Business Intelligent but I definitely want to do that. Please let me know what is you opinion, what is your thoughts about Magento’s BI. What you would like to improve there?
Hope you enjoyed this. If yes please give me a thumbs up. Appreciate your support.
Please also let me know if you want more technical details or more from business point of view in the comment section. That would help a lot to make it more valuable for you.
Thank you,
Zsolt Szalay