Weitere ähnliche Inhalte Ähnlich wie Weekday Demand Sensing at Walmart (20) Kürzlich hochgeladen (20) Weekday Demand Sensing at Walmart1. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
05/27/2021
Weekday Demand
Sensing at Walmart
2. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Walmart Stores
Overview
• The largest grocer in the U.S.
• Walmart employs over 2.3
million associates worldwide
• Over $500B annual sales
(over $330B in the U.S.)
• Over 11,300 stores worldwide
(over 4300 stores in the U.S.)
• Over 90% of the population
in the U.S. lives within 10
miles of a Walmart store
3. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Smart Forecasting
• A scalable forecasting platform to improve Walmart’s ability to predict customer demand
while improving item in-stocks and reducing food waste
• Adopted by all key departments in several global markets
• Generating weekly forecast for more than 100+ million item-store combinations every
week for the next 52 weeks
• Purpose:
• Inventory control (0-6 week horizon forecast)
• Purchase/vendor order and production planning
Our mission is to drive operational efficiency through
improvements in the ability to predict
customer demand
4. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Table of
contents Introduction
& Motivation
Model Results
Implementation
& scale
6. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Motivation
• Our store forecasting models are trained at scale every week, and weekly forecasts are
delivered every Monday
• We do not incorporate the most recent weekend sales in training our models as our ETL
processes start soon after Friday data has come in
• The idea for In Week Adjustments (IWA) project came from a Walmart Demand Manager
who devised and implemented a working prototype to prove out the concept
• The Weekend Sales Correction process uses replenishment rules to make practical store
forecast adjustments by accounting for factors such as days of supply and case pack sizes.
• IWA algorithm leverages historical sales patterns and linear models to predict the demand
7. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
In-week Adjustments (IWA) Algorithm
• A simple linear modeling approach to introduce forecast enhancements based on weekend
sales
• Adjusts initial weekly demand horizon 0 forecasts for Tuesday to Friday based on Saturday
and Sunday sales. E.g. if a product sells higher than forecasted on the weekend, we could
expect the remaining week’s sales to be higher than forecasted
• 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
9. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Algorithm: Training
Load Input
Data
Pre-process
data
Train Linear
Model
• Load historical weekly
demand forecasts for
target categories
• Load 52 weeks of
store-item-week sales
• Calculate each item’s
daily sales %age using
robust estimators
• Remove all store-item-
week combinations
which may not need
adjustments
• For each item, select
the store-item-week
where it is overselling
or underselling
• Train a linear model to predict
demand as:
𝒅𝒆𝒎𝒂𝒏𝒅 ~ 𝒒𝒕𝒚𝒔𝒂𝒕 + 𝒒𝒕𝒚𝒔𝒖𝒏 + 𝒇𝒐𝒓𝒆𝒄𝒂𝒔𝒕
10. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Algorithm: Scoring
Pull current week sales data including Saturday, Sunday sales, on
hand qty, Saturday stock, received qty and promotions
Score current week store-item combinations using the model
𝒇𝒐𝒓𝒆𝒄𝒂𝒔𝒕 𝒂𝒅𝒋𝒖𝒔𝒕𝒎𝒆𝒏𝒕 = 𝒔𝒄𝒐𝒓𝒆𝒅 𝒑𝒓𝒆𝒅𝒊𝒄𝒕𝒊𝒐𝒏 − 𝒇𝒐𝒓𝒆𝒄𝒂𝒔𝒕
Accept the scored prediction as the new forecast if the
adjustment suggests adjusting store inventory based on the
current on hand quantity and case pack sizes of the item
12. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Evaluation & Impact
• We performed a comprehensive back-test 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
Walmart produce categories
13. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Impact Contd.
For the produce department, the algorithm has consistently delivered week on week 40+
basis points improvement in the forecast accuracy metric.
15. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Model Implementation
Current Scope – Runs for one department : Produce
• Input data stored in HDFS, Teradata and NFS drive
• Model runs on a single server, parallelized across 56 cores
Why Spark?
Enable scale up to new departments and markets through:
1. Cloud data storage: The current data storage is split across HDFS & Teradata which is
difficult to maintain and refresh. Redundant file transfer between storage systems
Spark ecosystem offers blob storage + Hive (delta tables) as a unified data storage
solution for easy maintainability
2. Runtime improvement: Partitioning the data by item will help large forecast and sales
files to be processed faster. Parquet I/O is lot faster than CSV
By saving runtime we will be able to train and score for more departments and
markets without risking high compute costs
16. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Planned Implementation
Data Storage
Data stored in
blob storage as
parquet
files partitioned
by item
Model training &
scoring
Parallelized
implementation
of the model on
Spark using
Spark DFs
Model outputs
Model outputs
saved to parquet
Model integrated
with the Smart
forecasting
platform
17. ©2021 Walmart Inc. All Rights Reserved.
SENSITIVE INFORMATION CLASSIFICATION
Conclusion
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 customer availability