Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
Automating Inventory at Stitch Fix
Using Beta Binomial Regression for Cold Start Problems
Sally Langford - Data Scientist
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese an...
Presented at QCon New York
www.qconnewyork.com
Purpose of QCon
- to empower software development by facilitating the sprea...
How Stitch Fix works:
- Tell us about your style, fit and price preferences.
How Stitch Fix works:
- Tell us about your style, fit and price preferences.
- A personal stylist will curate five pieces for you.
How Stitch Fi...
- Tell us about your style, fit and price preferences.
- A personal stylist will curate five pieces for you.
- Try all the...
- Tell us about your style, fit and price preferences.
- A personal stylist will curate five pieces for you.
- Try all the...
- Tell us about your style, fit and price preferences.
- A personal stylist will curate five pieces for you.
- Try all the...
Benefits of Machine Learning in Inventory Management:
- Scalable with business.
- Rapid reforecasting.
- Capture nonlinear...
time
number of
units
order arrives
in warehouse
shirt is sent to
clients and is sold
plaid shirt
time
order arrives
in warehouse
shirt is sent to
clients and is sold
plaid shirt
number of
units
Inventory consumption of a style is proportional to;
- daily demand,
- clients for which the style is recommended,
- wheth...
Inventory consumption of a style is proportional to;
- daily demand,
- clients for which the style is recommended,
- wheth...
Inventory consumption of a style is proportional to;
- daily demand,
- clients for which the style is recommended,
- wheth...
Ranked styles recommended for client - which will the stylist choose to send?
Ranked styles recommended for client - which will the stylist choose to send?
Ranked styles recommended for client - which will the stylist choose to send?
Ranked styles recommended for client - which will the stylist choose to send?
Ranked styles recommended for client - which will the stylist choose to send?
plaid long-sleeve shirt
?
plaid long-sleeve shirt
plaid long-sleeve shirt
plaid long-sleeve shirt
...
plaid long-sleeve shirt
...
P(chosen) + P(not chosen) = 1
plaid long-sleeve shirt
?
...
plaid long-sleeve shirt
blue long-sleeve shirt
Prior Beliefs
Prior Beliefs
Evidence
Prior Beliefs
Posterior Beliefs
Evidence
N ~ Binom(Nav
, p)
N ~ Binom(Nav
, p)
N ~ Binom(Nav
, p)
p ~ B(α, β)
B(α’, β’) = B(α0
+ k, β0
+ n - k)
B(α’, β’) = B(α0
+ k, β0
+ n - k)
Step 1: Use maximum likelihood to calculate α0
and β0
for the distribution of p in
groups of similar styles.
Step 2: After...
VGAM (in python):
import rpy2.robjects as robjects
robjects.r.library("VGAM")
robjects.r("fit = vglm(cbind(successData,tri...
Data Storage
Job Scheduler
SQL Engine
SQL EngineHive Metastore
Flotilla: Auto scaling cluster
Job server for
Spark cluster...
Top 5 recommendations for client D
Top 5 recommendations for client C
Top 5 recommendations for client B
Top 5 recommendat...
B(α , β ) = B(μ/σ, (1 - μ)/σ)
μ
σ
μ = μ0
+ μn
log(1 + n)
number of
units
time
now planned orders
new styles
number of
units
time
now
forecasted units
planned orders
new styles
How do we use our inventory forecast model?
- When should we re-order inventory?
- How should we buy inventory by size?
- ...
Metrics of success:
- Fraction of inventory out with clients compared to in the warehouse?
- How many styles are available...
Do you want to calculate the probability of success in a binomial process?
Not enough data?
Use Beta Binomial Regression f...
slangford@stitchfix.com
Stitch Fix
Algorithms Blog
Algorithms Tour
@stitchfix_algo
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
stitch-fix-ml
Automating Inventory at Stitch Fix
Automating Inventory at Stitch Fix
Prochain SlideShare
Chargement dans…5
×

Automating Inventory at Stitch Fix

539 vues

Publié le

Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/2y3TyB6.

Sally Langford talks about the use of ML within StitchFix’s inventory forecasting system, the architecture they have developed in-house, their use of Bayesian methods, and how this technique can be applied to similar examples of beta binomial regressions. Filmed at qconnewyork.com.

Sally Langford is a data scientist on the Merch Algorithms team at Stitch Fix, which is responsible for developing tools and methods for inventory optimization and product development.

Publié dans : Technologie
  • Soyez le premier à commenter

Automating Inventory at Stitch Fix

  1. 1. Automating Inventory at Stitch Fix Using Beta Binomial Regression for Cold Start Problems Sally Langford - Data Scientist
  2. 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ stitch-fix-ml
  3. 3. Presented at QCon New York www.qconnewyork.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  4. 4. How Stitch Fix works:
  5. 5. - Tell us about your style, fit and price preferences. How Stitch Fix works:
  6. 6. - Tell us about your style, fit and price preferences. - A personal stylist will curate five pieces for you. How Stitch Fix works:
  7. 7. - Tell us about your style, fit and price preferences. - A personal stylist will curate five pieces for you. - Try all the items on at home. How Stitch Fix works:
  8. 8. - Tell us about your style, fit and price preferences. - A personal stylist will curate five pieces for you. - Try all the items on at home. - Give your stylist feedback on all items, then only pay for what you keep. How Stitch Fix works:
  9. 9. - Tell us about your style, fit and price preferences. - A personal stylist will curate five pieces for you. - Try all the items on at home. - Give your stylist feedback on all items, then only pay for what you keep. - Return the other items in envelope provided. How Stitch Fix works:
  10. 10. Benefits of Machine Learning in Inventory Management: - Scalable with business. - Rapid reforecasting. - Capture nonlinear relationships. - Cold start problems.
  11. 11. time number of units order arrives in warehouse shirt is sent to clients and is sold plaid shirt
  12. 12. time order arrives in warehouse shirt is sent to clients and is sold plaid shirt number of units
  13. 13. Inventory consumption of a style is proportional to; - daily demand, - clients for which the style is recommended, - whether there are units in the warehouse, - probability a stylist chooses to send the client this style, - if the client buys the style.
  14. 14. Inventory consumption of a style is proportional to; - daily demand, - clients for which the style is recommended, - whether there are units in the warehouse, - probability a stylist chooses to send the client this style, - if the client buys the style.
  15. 15. Inventory consumption of a style is proportional to; - daily demand, - clients for which the style is recommended, - whether there are units in the warehouse, - probability a stylist chooses to send the client this style, - if the client buys the style.
  16. 16. Ranked styles recommended for client - which will the stylist choose to send?
  17. 17. Ranked styles recommended for client - which will the stylist choose to send?
  18. 18. Ranked styles recommended for client - which will the stylist choose to send?
  19. 19. Ranked styles recommended for client - which will the stylist choose to send?
  20. 20. Ranked styles recommended for client - which will the stylist choose to send?
  21. 21. plaid long-sleeve shirt
  22. 22. ? plaid long-sleeve shirt
  23. 23. plaid long-sleeve shirt
  24. 24. plaid long-sleeve shirt
  25. 25. ... plaid long-sleeve shirt
  26. 26. ... P(chosen) + P(not chosen) = 1 plaid long-sleeve shirt
  27. 27. ? ... plaid long-sleeve shirt blue long-sleeve shirt
  28. 28. Prior Beliefs
  29. 29. Prior Beliefs Evidence
  30. 30. Prior Beliefs Posterior Beliefs Evidence
  31. 31. N ~ Binom(Nav , p)
  32. 32. N ~ Binom(Nav , p)
  33. 33. N ~ Binom(Nav , p) p ~ B(α, β)
  34. 34. B(α’, β’) = B(α0 + k, β0 + n - k)
  35. 35. B(α’, β’) = B(α0 + k, β0 + n - k)
  36. 36. Step 1: Use maximum likelihood to calculate α0 and β0 for the distribution of p in groups of similar styles. Step 2: After a period of time, update this prior for the number of times the new style has been recommended for a client (n), and chosen to be sent (k). Step 3: Calculate the mean and confidence interval of p from the resulting distribution. This is used as the probability that the new style will be chosen to be sent to a client. Step 4: Repeat steps 2-3.
  37. 37. VGAM (in python): import rpy2.robjects as robjects robjects.r.library("VGAM") robjects.r("fit = vglm(cbind(successData,trialData - successData) ~ 1, betabinomialff, trace=TRUE)") alpha, beta = robjects.r("Coef(fit)") import scipy fit = scipy.stats.beta.fit(data, floc=0, fscale=1) alpha, beta = fit[0], fit[1] --- result = scipy.optimize.minimize(loss_function, p0, jac=True, **kwargs)
  38. 38. Data Storage Job Scheduler SQL Engine SQL EngineHive Metastore Flotilla: Auto scaling cluster Job server for Spark cluster Data Scientist Code
  39. 39. Top 5 recommendations for client D Top 5 recommendations for client C Top 5 recommendations for client B Top 5 recommendations for client A Top 5 recommendations for client E
  40. 40. B(α , β ) = B(μ/σ, (1 - μ)/σ) μ σ
  41. 41. μ = μ0 + μn log(1 + n)
  42. 42. number of units time now planned orders new styles
  43. 43. number of units time now forecasted units planned orders new styles
  44. 44. How do we use our inventory forecast model? - When should we re-order inventory? - How should we buy inventory by size? - How should orders be separated into different warehouses? - When should a style not be sent out anymore, in place of a new option?
  45. 45. Metrics of success: - Fraction of inventory out with clients compared to in the warehouse? - How many styles are available to send to a client? - ∆ in the beginning of month projected units. - Cumulative units sold over time.
  46. 46. Do you want to calculate the probability of success in a binomial process? Not enough data? Use Beta Binomial Regression for your cold start problem!
  47. 47. slangford@stitchfix.com Stitch Fix Algorithms Blog Algorithms Tour @stitchfix_algo
  48. 48. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ stitch-fix-ml

×