tsfresh vs Hand-Made Features: Is Automatic Time Series Feature Extraction Worth It?
I installed tsfresh and benchmarked it against hand-made features on 400 synthetic windows: the wide bank wins inside the window and loses outside it.
Hourly Demand Forecasting with Random Forest: A Full Project, Start to Finish
A full hourly forecasting project on synthetic data: baselines, 12 clock-safe features, tuning, a one-time holdout, failure slices and three stress tests.
Cleaning Sensor Data: Z-Score and Rolling Rules for Time Series Outliers
Four outlier rules measured on 10,000 synthetic sensor readings: a global z-score finds nothing, Hampel catches every spike, and flatlines slip past both.
Direct vs Recursive Multi-Step Forecasting: Which Strategy Wins?
Recursive vs direct multi-step forecasting measured on three synthetic series: a tie on well-behaved data, and a chaotic crossover at step 17, not step 12.
Time Zones, DST, and Messy Timestamps: Fix Your Time Data Before Modeling
Seven timestamp traps measured in pandas: skipped and repeated hours, 23- and 25-hour days, UTC vs local hour features, mixed offsets, epoch units and formats.
Holiday and Event Features for Forecasting: How to Add Them in Python
Pandas holiday calendars, custom events like Black Friday, and the feature sets I measured: flags, distance to the next holiday, and names on 3,288 daily rows.
7 Data Leakage Traps in Time Series ML (and How to Catch Them)
Seven leakage traps built and measured: rolling windows, centered windows, shuffled splits, interpolation, target encoding, gaps, and late-published joins.
TimeSeriesSplit vs Walk-Forward Validation: Which One Should You Trust?
TimeSeriesSplit and walk-forward validation give identical splits, so the choice lives in the settings: expanding vs sliding windows, gap, and shuffled K-fold.
Day of Week in Decision Trees: Do You Need to Encode It?
Ordinal, one-hot and sin/cos weekday encodings tested on decision trees at every depth, plus when native categorical support removes the question entirely.
Rolling Window Features in Pandas: Moving Averages for ML
Rolling means, standard deviations and slopes in pandas, the shift(1) rule that stops leakage, plus how much an unshifted window inflates your validation score.
Lag Features in Pandas: Give Your Random Forest Memory
Build lag features in pandas, feed them to a random forest, and fix the trend problem by predicting the change instead of the level, with measured results.
Pandas Hourly Data: Calendar Features and a Leak-Free Split
Copy-paste pandas for hourly data: clean the index, add calendar and cyclical features, build safe lags, split by date and validate walk-forward with a gap.