AI engineering glossary · Feature engineering data prep

What is lag feature?

Lag feature: A feature that carries a previous value of a time series into the current row, such as yesterday's sales in today's row. It lets standard models use recent history to forecast the next value.

Level: intermediateTopic: Feature engineering data prep

Lag feature: an example

To predict tomorrow's electricity demand, you add demand_lag_1 (today), demand_lag_7 (a week ago) as columns.

Related terms

More Feature engineering data prep terms

Where you learn it

Lag feature is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.