Work out predictions ahead and cache them, or compute each one when someone asks?
Estimated time: 10 minutes · page 3 of 8
Predict ahead, or on demand
Static inference, or batch inference, works out predictions ahead of time and caches them. Dynamic inference, or online inference, computes a prediction the moment someone asks for it.
The board does both with the goals model. The table is static inference: expected goals for the next scheduled matches, worked out once and ready to serve. It's fast, and you can check every line before anyone sees it, but it only covers those matches. Below it, pick any two clubs and the board predicts that match on the spot. That's dynamic inference. There are 380 possible pairings in Premier League, far more than anyone would cache.
This site does both. Match pages show prices fetched every few minutes, close to a cache. The Poisson calculator works out expected goals in your browser for whatever match you open, which is dynamic. Dynamic inference handles the long tail of rare requests, but each prediction has to be fast, and you can only check predictions in aggregate, after the fact.