All Projects
Time Series

Hourly Energy Consumption Forecasting

10-model benchmark on 145,366 PJM hourly records (2002–2018). LightGBM best: MAE=210.8 MW, RMSE=285.4 MW, MAPE=0.66%. Prophet fails (MAPE=10.25%). BiLSTM MAPE=2.17%. 26 lag/rolling/cyclical features.

210.8 MW
LightGBM MAE
0.66%
LightGBM MAPE
10.25%
Prophet MAPE
2.17%
BiLSTM MAPE
Dataset

PJME: 145,366 hourly records (2002–2018)

Approach

26 lag/rolling/cyclical features → 10-model benchmark from naive baselines to BiLSTM

Tech Stack
PythonLightGBMXGBoostTensorFlow/BiLSTMProphetstatsmodels
Keywords
LightGBMXGBoostBiLSTMProphetLag FeaturesEnergy Forecasting
Visualizations4 Charts
Deep Dive

10-model time series benchmark for PJM hourly energy demand.

Dataset

  • PJME: 145,366 hourly records, 2002-01-01 to 2018-08-03
  • Range: 14,544–62,009 MW. Train: 85% / Test: last ~1 year (8,760 rows)

Feature Engineering (26 features)

CategoryFeatures
Laglag_1h, lag_24h, lag_168h (1 week)
Rolling statsmean_24h, std_24h, mean_168h, std_168h
Cyclicalsin/cos(hour), sin/cos(DOW), sin/cos(month)
Calendaris_weekend, is_holiday

All 10 Models

ModelMAE (MW)RMSE (MW)MAPE
Naive (last value)5,2055,90816.5%
Seasonal Naive (1W)3,5884,85611.2%
Moving Average2,8743,6439.2%
Linear Regression3805191.2%
Random Forest3484651.1%
Prophet3,2484,23110.3%
BiLSTM6999172.2%
XGBoost2223000.70%
LightGBM2112850.66%

Key Insights

  • Tree models with lag features MAPE < 1% vs Prophet's 10%+
  • Prophet cannot leverage the strong lag-24h autocorrelation
  • BiLSTM underperforms XGBoost despite more parameters — engineered lags encode temporal structure better than learned recurrence
  • Top LightGBM features: lag_1h, hour_cos, hour (immediate past + time-of-day)