← 📈 Data Science & Machine Learning

📈 Time-Series Feature Lab

Rolling mean:
Rolling σ:
sin / cos:
Lag(1) value:
FPS:
Drag — rotate · Scroll — zoom

📈 Lag Features, Rolling Windows & Cyclical Encoding

A raw time-series signal slides past a scoring cursor while orange lag markers, a translucent rolling window, and a rotating sine/cosine wheel show exactly how each engineered feature is derived before it ever reaches a model.

🔬 What It Demonstrates

Lag(1)…lag(N) bars copy past values into the current row, a rolling window computes trailing mean and ±1σ volatility, and a wheel decomposes cyclical time (hour/weekday/month) into sin and cos columns so periodic boundaries don't create false distance.

🎮 How to Use

Adjust lag steps and rolling window size, pick a cyclical period, and watch the live stats update as the series plays. Pause anytime to inspect a single row, or generate a fresh synthetic signal.

💡 Did You Know?

Computing lag or rolling features from data that includes future rows (instead of strictly the past) is one of the most common causes of time-series data leakage — it inflates validation scores that then collapse in production.