tezvyn:

Reframe time series for a tree model

Source: interviewintermediate

WHAT IT TESTS: turning forecasting into supervised learning. OUTLINE: lag and rolling-window features, calendar and cyclical encodings, then split chronologically to avoid leakage. RED FLAG: random shuffling that lets future data leak into training.

WHAT IT TESTS: whether you can recast a temporal forecasting problem into the tabular supervised format trees expect. ANSWER OUTLINE: engineer lag features (t-1, t-7), rolling statistics like moving averages, calendar features and cyclical sine/cosine encodings for seasonality, and exogenous variables; the target is the future value. Crucially, split data chronologically and use time-series cross-validation.

Read the original → interview

Get five bites like this every day.

Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.

Reframe time series for a tree model · Tezvyn