Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

When you're going through hell, keep going: using machine learning to deliver tesla model 3s

333 views

Published on

Michael Lindon, Senior Data Scientist, Tesla

Published in: Technology
  • Be the first to comment

When you're going through hell, keep going: using machine learning to deliver tesla model 3s

  1. 1. USING MACHINE LEARNING TO DELIVER TESLAUSING MACHINE LEARNING TO DELIVER TESLA MODEL 3'SMODEL 3'S Michael Lindon
  2. 2. DISCLAIMER!DISCLAIMER! [not real data]
  3. 3. SUPPLY CHAIN AUTOMATIONSUPPLY CHAIN AUTOMATION Michael Lindon Charles Freundlich Sr. Data Scientist Sr. Manager
  4. 4. (mock)
  5. 5. source: https://www. ickr.com/photos/steevithak/34209933664
  6. 6. (mock)
  7. 7. DATADATA
  8. 8. DATA STRUCTUREDATA STRUCTURE
  9. 9. SOURCES OF MEASUREMENTSOURCES OF MEASUREMENT Mobile App Carrier Portal Hub Logistics Worker Tesla Logistics Worker
  10. 10. FEATURESFEATURES Driver Type: Single Driver/Team Driver Service Level: Standard/Expedited Driver ID Company Weather Information Tra c Information Temporal Features
  11. 11. FIRST PASS MODEL: XGBOOSTFIRST PASS MODEL: XGBOOST
  12. 12. "These features aren't available at runtime..."
  13. 13. Features are not known for future predictions Regression Density Estimation→
  14. 14. "These transit and dwell times don't make sense"
  15. 15. Mobile App - Human Error Carrier Portal - Human Error Hub Logistics Worker - Human Error Tesla Logistics Worker - Human Error Data Processing - Logical Errors
  16. 16. DESIGNING OUR OWN EXPERIMENTDESIGNING OUR OWN EXPERIMENT
  17. 17. DATA SCIENCE SUPERPOWERSDATA SCIENCE SUPERPOWERS Experimental Design Data Engineering Statistics + ML
  18. 18. GEOFENCESGEOFENCES
  19. 19. GEOFENCES + CAR GPSGEOFENCES + CAR GPS
  20. 20. RAW TRAINING DATARAW TRAINING DATA
  21. 21. Transit/Dwell Times are "interval censored"
  22. 22. BASIC MODELLINGBASIC MODELLING
  23. 23. Observe: , … ,z1 zn yi (μ, )σ 2 ∼ LogNormal(μ, )σ 2 = log zi ∼ NI ( , λ, , )χ 2 μ0 ν0 σ 2 0 ∈ [ , ] :=yi Li Ui Ii
  24. 24. Joint has tractable conditional distributions: π(μ, |I) = ∫ π(y, μ, |I)dyσ 2 σ 2 |μ, ,yi σ 2 Ii (μ, )|y, Iσ 2 ∼ T N(μ, , , )σ 2 Li Ui ∼ NI ( , , , )χ 2 μ̃  λ̃  ν̃  σ 2 ~
  25. 25. OPTIMIZATION: EM ALGORITHM [1]OPTIMIZATION: EM ALGORITHM [1] Expectation w.r.t. truncated-normal Mode of Normal-inverse- Computes the MAP estimate of and Q(μ, | , )σ 2 μ (t) σ 2(t) ,μ (t+1) σ 2(t+1) := [log π(μ, , y|I)| , ]σ 2 μ (t) σ 2(t) ← argmax Q(μ, | , )σ 2 μ (t) σ 2(t) χ 2 ⇒ μ σ 2
  26. 26. MCMC: GIBBS SAMPLING [2]MCMC: GIBBS SAMPLING [2] Generate Generate ∼ π( | , , )y (t+1) i yi μ (t) σ 2(t) Ii (μ, ∼ π(μ, | , I)σ 2 ) (t+1) σ 2 y (t+1)
  27. 27. TRANSIT EXAMPLE:TRANSIT EXAMPLE:
  28. 28. EXPECTATION MAXIMIZATIONEXPECTATION MAXIMIZATION = 1.946μ̂  = 0.003σ̂  2 ⇒ [z] = 7.01 [z] = 0.15
  29. 29. MARKOV CHAIN MONTE CARLOMARKOV CHAIN MONTE CARLO
  30. 30. NONPARAMETRIC DENSITY ESTIMATIONNONPARAMETRIC DENSITY ESTIMATION
  31. 31. DIRICHLET PROCESS MIXTURE MODEL [3,4]DIRICHLET PROCESS MIXTURE MODEL [3,4] Censored Observations: | ,yi μi σ 2 i ( , )μi σ 2 i G ∼ N( , )μi σ 2 i ∼ G ∼ (NI ( , λ, , ), α)χ 2 μ0 ν0 σ 2 0 ∈ [ , ]yi Li Ui
  32. 32. ESTIMATED SURVIVAL FUNCTIONESTIMATED SURVIVAL FUNCTION
  33. 33. ESTIMATED DENSITYESTIMATED DENSITY
  34. 34. DECISION THEORYDECISION THEORY
  35. 35. Point Estimate "ETA" Neglects Uncertainty Model Output is Posterior Predictive Distribution Need to schedule car pickup date p( |Data) = ∫ p( |θ)p(θ|Data)dθy ⋆ y ⋆
  36. 36. customer pickup date (action) car arrival time at service center (rv) Loss function Late Arrivals Damage Brand Storage Costs Working Capital Costs a ∈  y ⋆ L(a, )y ⋆
  37. 37. MINIMIZING EXPECTED LOSSMINIMIZING EXPECTED LOSS R(a) â  = ∫ L(a, )p( |Data)dy ⋆ y ⋆ y ⋆ ← argmin R(a)
  38. 38. References 1. Dempster, A., Laird, N., & Rubin, D. (1977). Maximum Likelihood from Incomplete Data via the EM Algorithm. Journal of the Royal Statistical Society. Series B (Methodological), 39(1), 1-38. 2. Kuo L., Smith A.F.M., MacEachern S., West M. (1992) Bayesian Computations in Survival Models Via the Gibbs Sampler. In: Klein J.P., Goel P.K. (eds) Survival Analysis: State of the Art. Nato Science (Series E: Applied Sciences), vol 211. Springer, Dordrecht 3. Michael D. Escobar & Mike West (1995) Bayesian Density Estimation and Inference Using Mixtures, Journal of the American Statistical Association, 90:430, 577-588, DOI: 10.1080/01621459.1995.10476550 4. Radford M. Neal (2000) Markov Chain Sampling Methods for Dirichlet Process Mixture Models, Journal of Computational and Graphical Statistics, 9:2, 249-265, DOI: 10.1080/10618600.2000.10474879

×