Feature engineering and preprocessing · insight-1123
Build calendar features for each timestamp that drives the outcome, such as booking date and travel date
- Evidence type
- practitioner heuristic
- Difficulty
- medium
- Roles
- Data scientist, Data analyst
- Industries
- aviation, e-commerce
Summary: situation, action, reason, boundary
Situation
A booking table has both booking date and departure date, but only departure-date calendar features exist because it is the row key.
Action
Derive weekday, month and holiday-proximity features for both timestamps plus lead time, then test each family by ablation to see which cycle carries the signal.
Reason
Buying behaviour and travel demand follow different calendars; each deserves its own seasonality terms rather than sharing one.
Boundary
Bookings, orders, claims and loans where an event date and a service or maturity date coexist.
Symptom or risk
Two separate cycles, when travellers buy and when they fly, are entangled in one set of calendar columns, so the model cannot separate purchase habits from travel demand.
Exceptions
Same-day products where both timestamps coincide.
Trade-offs
More correlated columns to select among, and lead time must be computed from the decision moment.
Pitfalls
Using the booking date of the final record rather than of the snapshot being predicted.