This case study is related to a leading drug store which has more than 3500 stores across 7 European Countries. Our objective is to predict the daily sales for over a 1000 stores for a period of 6 weeks.
Taking the headache of precise revenue forecasting off of the organization helps them better focus on what’s most important to them: Customers and their Teams.
Reliable sales forecasts enable store managers to create effective staff schedules that increase productivity, motivation and better prepared for future working capital needs. Currently, the store managers are tasked with predicting daily sales of six weeks in advance. Traditionally, predictions are made on intuitions based on experience or through some ERP systems. However, these methods work on statistical solutions and doesn’t account for external factors. As store sales are influenced by many factors including but not limited to – promotions, competitions, school and state holidays, seasonality, locality and temperature. Taking all of these factors into accounts for human experts or statistical approaches gets extremely difficult. With thousands of individual managers predicting sales based on their unique circumstances, the accuracy of the result can be quite varied.
We have historic dataset of last 3 years, including not only the sales for each day at different stores but also some external features such as total customers, competitions, promotions and holidays in respective place the store is located.
An overview of the data is:
On exploring, we found that daily sales for store-1 varies from $2500 on its worst day to $9500 on its best day. This huge difference is sales could be due to various factors that leads to sales on any particular day.
A simple time-series analysis (TSA) for sales prediction can also be useful in some cases. In our exploration, we found the below results using TSA.
However, TSA only considers the historical values of Sales and doesn’t consider any other factors that can affect sales. Let’s say today is Friday with a high temperature of 95 – 100 with scorching heat, we are running a promo and there is a state holiday coming up during the weekend. What would be the sales today? How many employees do I need to keep my customers happy?
If we knew the probability distribution for the demand on a day with the mentioned values of features, we would be able to determine the likely value with reasonable accuracy.
Unfortunately, we don’t know this distribution. It would be reasonably pretty difficult to take into account all these factors and make a precise guess. Moreover, as the number of features/factors increases so does the complexity of prediction.
With the recent advancements in technology (machine learning) and availability of richer datasets, we can get a real time simulator where we can change values for any of these features to see how it would possibly affect sales.
We at Neurai, have developed a Deep Neural Network (DNN) model which learns the non-linear relationship between the features and how it affects the objective (in this case, sales). We chose DNN over linear regression as there is no simple function that tells us Sales when we know the feature values as precisely. Our model takes in internal as well as external factor into consideration to predict the outcome.
Deep learning assesses the quality of a solution using a loss function, which measures how far the prediction is from its target. If the output is a demand prediction, then the loss function would measure how close the prediction was to the actual demands — sort of like a forecast error.
Our system was able to predict the daily sales with less than 10% error rate across the stores. With high precision in prediction, staff planning can be done reliably and efficiently by the store managers. Thus, even if stores are crowded, employees can have enough time to help each customer.