A temporal feature turns a date or time interval associated with a row into model input. It helps a model account for how time affects other features and the target, rather than treating sequential patterns as ordinary row-to-row relationships. section 2.1.1
When every row has a date, transform it into a usable value, such as continuous Unix time, and consider lagged features. Because time-series observations are autocorrelated, evaluate this setup with cross-validation strategies designed for time series. section 2.1.1
Two practical ways to represent time are:
- Keep one row per observation and transform its date or interval into a feature. This treats the task as time-series analysis and requires time-aware validation. section 2.1.1
- Pivot measurements from different moments into separate columns, such as sales_month_1 and sales_month_2. This representation can return the data to an IID tabular form. section 2.1.1
- Extract calendar or recency signals from a date field, such as the month or season of last_review and time since the last review. section 7.1.3
Listing recency features
For accommodation listings, last_review can yield the review month, review season, or elapsed time since review. These features express recency and calendar context without using the raw date as an unprocessed field. section 7.1.3
Figure 2.1 Comparison of IID and non--IID data sequences. The left chart shows IID data, while the right chart illustrates non-IID data, highlighting the sequential correlation patterns.
Compare independent rows with sequentially correlated observations to see why time may need explicit representation and time-series validation. section 2.1.1
