Deploying Bayesian Models with PyMC3

I’m not an expert on deployment, but I can try to answer a few of the others:

(7) Yes—one of the places the Bayesian approach excels is in online learning situations. This is because of the natural translation from “prior / observations” to “trained model / new data.” You’d train a Bayesian model (hierarchical regression or any other) on whatever data is available, then as new data came in you’d treat the old posterior as the new prior.

I read Bayesian Product Ranking at Wayfair earlier this year, and it’s a great example. They use a slightly more sophisticated approach (keeping most of the posterior but intentionally forgetting some information, through some autoregressive process that I don’t fully understand), but the core idea is the same.

(9) Variational inference is definitely one way, but in my experience it depends pretty heavily on your use case and what “big” data is. Another idea might be to reformulate your problem into several smaller models that can train at different levels of aggregation, though this is very problem-specific and by no means one-size-fits-all.

4 Likes