What is a lag feature in time series modeling?

Updated May 15, 2026

Short answer

A lag feature uses past values of a time series as inputs for predicting future values.

Deep explanation

Lag features transform time series into supervised learning format by shifting data backward. For example, lag-1 uses previous timestep value as input. This helps machine learning models capture temporal dependencies explicitly.

Real-world example

Predicting tomorrow’s sales using yesterday’s sales.

Common mistakes

  • Using future data in lag creation (data leakage).

Follow-up questions

  • What is data leakage in time series?
  • How many lag features should be used?

More Time Series interview questions

View all →