Retail Demand Forecasting with Machine Learning: For over two decades, time-series methods, in combination with hierarchical spreading/aggregation via location and product hierarchies, and subsequent manual user adjustments, have been a standard means by which retailers and the software vendors who serve them have created demand forecasts. The forecasts so produced are and were used as inputs to store and vendor replenishment, regular and markdown pricing, and other downstream decision support systems. The rise of machine learning — the advent of high-powered commercial product recommender systems such as books at amazon book and movies at netflix, of powerful search (e.g., google), text processing (e.g., Facebook) and sentiment analysis capabilities, IBM Watson, self-driving cars and the like — is real phenomenon based on academically-sound and industrially-proven techniques whose application to retail demand forecasting is ripe.
4. GETTING DEMAND FORECASTING RIGHT TRANSLATES TO $$$
▪ Size of the problem
▪ 62 billion weekly forecasts (150K active skus X 8,000 stores X 52 weeks)
▪ Many TB’s of data
▪ 3,000 computing cores elastically provisioned
▪ Forecast accuracy
▪ Measured 25% to 50% reduction in MAPE
▪ The harder the problem the better the improvement
▪ Measured reduction of bias in forecasts
▪ Benefits
▪ $125M from inventory reductions alone
▪ 20% ongoing benefit
4
5. IN THE BEGINNING, DEMAND FORECASTING SEEMED SIMPLE...
5
Time-series forecasting
6. …BUT THEN EVER GREATER COMPLEXITY AROSE
6
A Last year’s sales
B Manual partitioning of
data, different TS
models for different
partitions
C Croston’s for sparse,
Winters for dense
D Forecast at aggregate
levels, spread down
J if/then/else assignment of
different TS algorithms
...
N Have user manually
map a new SKU to an
existing one
...
O Have user manually
inject local market
knowledge
L Linear regression for
promotions
Alarm Clock: Demand
forecasts. But are they
really “simple”?
7. …AND SO NOW WE ASK THE QUESTION
7
A Last year’s sales
B Manual partitioning of
data, different TS
models for different
partitions
C Croston’s for sparse
demand, Winters for
dense
D Forecast at different
hierarchical levels,
spread down
J Automated if/then/else
assignment of different TS
algorithms
...
N Have user manually
map a new SKU to an
existing one
...
O Have user manually
inject local market
knowledge
L Linear regression for
promo
Alarm Clock: Demand
forecasts. But are they
really “simple”?
REALLY?
Machine learning can provide a modern, simpler,
theoretically sound and more extensible alternative for
retail demand forecasting
8. CAUSAL FACTORS DRIVE RETAIL DEMAND
How much additional
demand was generated for
Post Cereals because
these were on promotion?
How much does the $4 in-store
coupon contribute to the total
uplift?
Does the table highlighting the
$1.50 coupon and the final offer
price drive any additional uplift?
Competition
Weather
9. SO AN ATTRIBUTE-BASED FORECASTING APPROACH IS APT
Inputs include:
• Product Attributes
(including text descriptions e.g. reviews)
• Hierarchies
• Competitor Data
• Promotions
• Pricing
• Display
• Store Attributes
• Local events
• Weather
• Customer data
• ...
CLOUD ELASTICITY
Machine Learning:
• 2-way interactions
• 3-way
• 4-way
Predictive Analytics
What If on
price/promo/display
changes
Demand Forecasts
▪ Basic products
▪ New products
▪ Short lifecycle
▪ Customer specific
▪ ...
10. POSSIBLE SUPERVISED LEARNING MODELS
10
Random forests Restricted Boltzman
machines
Deep learning
We chose factorization machines for
several reasons
● Linear regression heritage of market mix
modeling
● SGD/online suitability for handling large
data sets
● Trend can be modeled
11. ZERO-FILLING --- KNOWING WHY DEMAND DID AND DIDN’T OCCUR AND WHEN
● Unlike for product recommender
systems, retail forecasting must
predict the timing of when demand
will happen (not just the rating
whenever it happens)
● An observation of sales might have
(sku,store,day) primary key
○ Was the product on the shelf
available to be sold?
○ How much was sold, if any?
● In many retail contexts, the vast
majority of observations have zero
sales
○ Recent example: zero sales
observations account for >97.5% of
the training set
○ It is important to know why demand
was zero
11
Extreme Case:
Demand only occurs when there’s a discount
13. EXAMPLE FORECASTS - SEASONAL GROCERY ITEM
13
Training on the left and middle
One month of holdout / test at the very right
14. EXAMPLE FORECASTS - QUICK SERVICE RESTAURANT
14
For very dense
data - few
zeros - almost
unbiased
forecasts with
WAPE values
below 12.5%
can be
achieved
17. CHALLENGES / ONGOING WORK
● Zero-filling / training set cardinality control using weighted least squares
● Global effects and 2-way interactions are easily trainable, but 3-way and higher-order
interactions require judicious feature engineering
● Parallel learning / consensus of learners
● Visualization / explanation of hidden factors used for interaction modeling
● Automated pruning of non-important attributes
17