Weekday Demand Sensing for Weekly Forecasting Models
Authors: Sucheta Jawalkar, Chinmay Jha
The SMART Forecasting team at Walmart Labs is tasked with providing demand forecasts for over 500 million store-item combinations every week! For example, just how many strawberries need to go to every Walmart store in the U.S., every week for the next 52 weeks, with the goal of improving in stocks and reducing food waste.
We demonstrate a simple linear modeling approach to introduce forecast enhancements based on weekend sales. This algorithmic approach has been readily adopted by our business partners and has consistently delivered business impact over the past year.
In addition to boosting the quality of the demand forecasts the algorithm reduces forecast adjustment touches for busy demand managers without adding additional ETL overhead.
Our store forecasting models are trained at scale every week and weekly forecasts delivered every Monday. We do not incorporate the most recent weekend sales into our models as our ETL processes start after Friday data has come in.
The idea for In Week Adjustments (IWA) project came from a Demand Manager in the produce department that had a similar adjustment tool he devised and implemented which we will call Weekend Sales Correction from the Store Optimization Tool (SOT). The “Weekend Sales” correction which uses “replenishment rules” to make practical-for-store forecast adjustments by accounting for factors such as days of supply and case pack sizes. IWA algorithm introduces Store-level historical sales patterns and linear models to predict the demand.
On Monday morning, use the weekend produce sales and the weekly SMART forecast to determine if the items are over or under selling, and adjust forecast for Tuesday through Friday if needed.
Use a simple linear model to forecast demand for Tuesday through Friday
demand = A*Saturday sales + B*Sunday sales + C* system forecast
Model Training
We estimate of the proportion of expected weekend sales, based on historical data which we use to classify an item-store combination as overselling if it sells more than 110% of the weekly forecast and as underselling if it sells less than 60% of the weekly forecast. These values have been hardcoded to mimic the “Weekend Sales Correction” tool. We then train separate linear models for underselling and overselling item-store combinations, using the Saturday sales, Sunday sales and weekly forecast as the independent variables.
Model Scoring
On Monday morning, we have the latest weekend sales data. We repeat the process of flagging an item-store combination as overselling or underselling. For those item-store combinations as overselling (underselling), we use the trained overselling (underselling) linear models to generate a new predicted forecast. The predicted forecast is then distributed across Tuesday to Friday, depending on historical proportion of sales on these days of the total weekly sales. Finally, we ensure that the adjustments being recommended by the algorithm for Tuesday to Friday adhere to the business rules for replenishment accounting for factors such as case packs, safety stock, max/min adjustments, promotions etc.
Impact
To evaluate how well the IWA model performed, we performed a comprehensive backtest across all categories in produce and grocery for a period of 12 weeks. As shown in the plot below, IWA showed tremendous promise as evidenced by BPS improvement in over 70% of produce categories.
For the produce department, the algorithm has consistently delivered week on week 40+ basis improvement in the forecast accuracy metric. It has successfully caught the forecast shoulders at the beginning and end of highly seasonal items like strawberries providing over 70+ basis points improvements for the week.
Since its implementation in March 2019, the IWA algorithm has successfully delivered hundreds of basis points improvements week on week and helped reduce food waste and improve in stocks.
Thanks to Micah Nichols for many conversations explaining the SOT tool, Sasanka Katta for the product idea and product support, Lachlan Bubb for the algorithm development and implementation; John Bowman and Anton Bubna-Litic for technical feedback; Avi Dixit for ETL and Tableau support.
I have a Ph.D. in experimental nuclear physics from The College of William and Mary, was a postdoctoral associate at Duke University and Physics faculty at Santa Clara University where I modeled petabytes of scattering data to understand the structure of the tiny building blocks of the known universe. I am an Insight Data Science Fellow, an Aspen scholar and love working on machine learning at scale!
Chinmay completed his Masters in Business Analytics from Massachusetts Institute of Technology and Bachelors in Technology from Indian Institute of Technology, Madras. As an Associate Product Manager in the SMART Forecasting team, he helps build machine learning products to solve business problems in the retail and e-commerce space.