Demand Segmentation with ML models

Demand Segmentation with ML models

For supply chain professionals demand segmentation is a very familiar word . If you have worked in any organization as demand planner then you might have either implemented ABC-XYZ analysis or adopted some variant of this standard statistical approach of segmentation. At the core it lies our need to improve demand planning accuracy ( say metrics ) by focusing limited resources where it matters most . Let us say that you have thousands of SKUs in your portfolio and have been tasked by your manager to find a better strategy to do demand planning . One approach ( Like 6 Months moving average *) may not be best way to model your data . May be there exists some SKUs which are better left to stat models releasing lots of time for planning team to focus on other activities . ABC-XYZ analysis and it’s variants guide you towards that direction . In this article, objective is to explore the idea of doing demand segmentation using ML models ( Not deep learning !) . Is it really possible ? Yes, ping ChatGPT , it throws up plethora of details about the same but we intend to go beyond that . In business set up , we search for what works !

DATA

I have created an imaginary data base that loosely represents the demand pattern we see in real world . There are 47 SKUs with demand history of 24 months ( in monthly buckets, data shape =(47,25)).

No alt text provided for this image
Sample Data

Each of these SKUs are representing a different demand group . It is important that we familiarizes ourselves before we proceed any further .

No alt text provided for this image

LTS — Stands for demand history with Level, Trend and seasonality , LS — Level and Seasonality , INT — intermittent demand , V — very volatile ( Once in a while meagre demand ), INT and V are difficult to forecast . We have 9 SKUs which fall into LTS category.

In below chart , you can actually observe the demand pattern ( I have applied group by on Type , consolidated with mean value) and convince yourself that it is the case . For example , LFS ( green line ) shows the seasonality and trend .

No alt text provided for this image
Demand Pattern ( Showing seasonality , Trend etc)

Modeling ( Unsupervised )

We will work with Gaussian Mixture model ( GMM) . If you are not familiar with GMM then you can either google it or use ChatGPT . Any way I would not leave you in complete darkness either . Very loosely speaking , it can be called soft K-Means . Also note that probability and likelihood are two different things. Most of ML algorithms use MLE ( Maximum Likelihood estimate ) and so is the case with GMM. Given the observation ( in our case demand data ) , we try to estimate the parameters ( mean , weights and Variance ) which optimizes the log likelihood ! Since there is no straight solution to optimization , expectation and maximization approach is used . There is quite a bit of math involved so I would suggest that you refer to some articles on web .

No alt text provided for this image
Application of GMM
No alt text provided for this image

What you see above is the outcome . 0,1,2,3 etc are clusters as learned by GMM. Surprisingly such a powerful ML algorithm has disappointed us here . LTS Skus are clustered with three groups ( 0,2,3) against expectation of one . Don’t know why it happened . I tried multiple iterations ( without scaling as well) but outcomes were more or less similar . May be dataset is very small .?We can easily get the clusters statistically by just looking at ration of ( Mean /Standard deviation )?. Feel free to share your experience if any .


Modeling Supervised

I know that I have a very small date set but still experimented with Random Forest Classifier .

No alt text provided for this image
No alt text provided for this image

From above scatter chart , we can clearly see that story is not different here either . Cluster 2 is predicted as 2 but also as 1 and it the same case with 3 etc. Given the size of training data set , RFC can be excused but the fact is there are many industry where we don’t have more data . A beer manufacturing company will not have more than 50 SKUs ( our dataset actually imitates demand pattern of this industry ( India ) ) then these shallow ML models may not be useful .

Let us conclude here . We need more experimentation to judge the effectiveness of ML models ( shallow , not deep learning ) on demand segmentation . It is also obvious that industries with lesser number of SKUs would be better served by adopting statistical approach of demand segmentation . ML algorithms are very capable enough but they simply do not seem to learn the trick for segmentation !

要查看或添加评论,请登录

Ravi Prakash的更多文章

  • BERT -The Bahubali powering Google search Engine

    BERT -The Bahubali powering Google search Engine

    Try recalling the famous opening theme song of the TV series The Big Bang Theory. It goes like .

    1 条评论
  • Predicting the future of Heath care

    Predicting the future of Heath care

    In next 5 to 15 years AI powered Robots would be the first doctors who will attend to you during hospital visits. A…

  • Demand Segmentation - Simplified

    Demand Segmentation - Simplified

    For supply chain professionals demand segmentation is a very familiar word . If you have worked in any organization as…

  • Rise of chat GPT ( Part-1)

    Rise of chat GPT ( Part-1)

    There are few events in history of human evolution which propelled us into new era and arrival of GPTs ( Generative…

    1 条评论
  • Time Series Forecasting with RNN, LSTM and SARIMA

    Time Series Forecasting with RNN, LSTM and SARIMA

    It is highly probable that you might have been introduced to some of these cryptic words( like RNN etc.) during any…

  • An Epic Journey of Exponential Smoothing ( Part-1)

    An Epic Journey of Exponential Smoothing ( Part-1)

    Forecasting has always allured human beings. Priestesses of Delphi delivered prophecy in ancient Greece after being…

    1 条评论
  • AI battle -Bard vs ChatGPT

    AI battle -Bard vs ChatGPT

    Have you seen the Hugh Jackman starring science fiction sports drama movie Real Steel ? If not then it is worth your…

    2 条评论
  • Curse of Dimensionality and PCA!

    Curse of Dimensionality and PCA!

    Have you ever tried to visualize a space with more than 3 dimensions? It is really hard on mind. In world of Machine…

  • Black Magic method of Demand Planning

    Black Magic method of Demand Planning

    Le Verrier ( French Astronomer) began studying the motion of Mercury (during 1843) and published a report . In 1859, Le…

    1 条评论
  • Outliers ( Time Series)

    Outliers ( Time Series)

    What are outliers ? The basic question is why do we need to review outliers ?Why do we need to correct it ? What can go…

    2 条评论

社区洞察

其他会员也浏览了