Predicting the future with goopti

24
Predicting the future at @sbelak [email protected]

Transcript of Predicting the future with goopti

Page 1: Predicting the future with goopti

Predicting the future at

@sbelak [email protected]

Page 2: Predicting the future with goopti

The problem/our business model

• Combine multiple orders into one vehicle (packing)

• Baseline prices assume certain occupancy

• Pricing as risk hedging

• Demand responsiveness

• Demand prediction price occupancy

order clumping

higher occupancy, lower risk

Page 3: Predicting the future with goopti

Predicting the future, part I: The Basics

Page 4: Predicting the future with goopti

Decompose +

Compose

Page 5: Predicting the future with goopti

Decompose +

Compose

Page 6: Predicting the future with goopti

Seasonality• Hour of day

• Day of week

• Week/month of year

• …

• de-trend + FFT

• A lot of constituent variables have seasonal component as well!

Page 7: Predicting the future with goopti

Trends

Page 8: Predicting the future with goopti

Feature engineering• 1st, 2nd derivates

• Scale-invariant encoding

• Distribution = binning + one-hot encoding

• Time series are a rich source of features (and inspiration)

• github.com/blue-yonder/tsfresh

Page 9: Predicting the future with goopti

Decompose +

Compose

Page 10: Predicting the future with goopti

Additive models

Page 11: Predicting the future with goopti

Additive = interpretable*

* sort of, maybe, sometimes

Page 12: Predicting the future with goopti

Not additive? No problem. Box-Cox transform to the

rescue.

Page 13: Predicting the future with goopti

Generalized Additive Models (GAM)

• Don’t have to choose model upfront

• Prescreen variables (weight of evidence) + multivariate selection (stepwise, shrinkage)

• Regularization via controlling smoothness

link function

smooth nonparametric

function

Page 14: Predicting the future with goopti

Simulations (aka.: It’s counting all the way down!)

1. Sample from distributions (can be completely empirical!)

2. Combine (can use arbitrary domain logic)

3. Repeat 1000s of times

4. Aggregate (mean + variance)

Page 15: Predicting the future with goopti
Page 16: Predicting the future with goopti

Feedback loopsWhen predicting a continues process, use errors from previous points in time as a corrective signal for subsequent predictions.

Page 17: Predicting the future with goopti

Cold start problems• Model transfer

• Switch/add models

• as available data increases

• when uncertainty too high

• Enrich data with outside sources

Page 18: Predicting the future with goopti

Predicting the future, part II: The Big Guns

Page 19: Predicting the future with goopti

EnsamblesCombining, stacking

Page 20: Predicting the future with goopti

LSTM

• Don't multiply, use addition instead

• Gate all operations so that you don't have to cram everything

(= input->hidden) (= hidden->output)

(= hidden->hidden)

Page 21: Predicting the future with goopti

Takeouts1. Decompose + compose

2. Additive = interpretable (and open to experiments)

3. Data science is about encoding and representing information, not algebra

4. Different models for different occasions

5. Going immediately for the big guns is an all-or-nothing proposition

Page 23: Predicting the future with goopti

Come work with me!@sbelak

[email protected]

Page 24: Predicting the future with goopti

Further reading

• multithreaded.stitchfix.com/assets/files/gam.pdf

• www.wessa.net/download/stl.pdf

• colah.github.io/posts/2015-08-Understanding-LSTMs

• github.com/blue-yonder/tsfresh