A feature is code that runs at prediction time
What it is
In a notebook a feature is a column. In production it is a function that must produce a value for every live request:
- from data that exists at that moment;
- within the latency budget;
- computed exactly the same way as in the training data.
Why it matters
That changes which features are worth having.
- A feature that needs a slow join across three databases may be fine offline and impossible live.
- A feature that depends on information arriving later (the final basket value) cannot be used before checkout.
- Asking 'how will this be computed at serving time?' for each feature prevents most production surprises.
In the real world: Kirana Kart's ETA team keeps a one-line note beside every feature: where its live value comes from, how old it may be, and who owns it.
Designing features in a notebook from the warehouse, with no thought for serving. The best feature turns out to be a 30-day aggregate nobody can compute in 20 ms.