HomeAboutServicesPortfolioScrapersReviewsBlog Hire me
Case study

Forecasting Half-Hourly Electricity Demand

Category
Forecasting
Stack
LightGBM · XGBoost · LSTM
Data
Half-hourly demand history
Status
Report delivered
0.21%
LightGBM validation MAPE
2.52
Validation RMSE (best model)
3
Model families compared

Problem

Grid operators buy and schedule power ahead of time; the cost of a bad demand forecast shows up in both directions. This project forecast half-hourly electricity demand for a full target day, comparing gradient boosting against deep learning to find the most accurate practical model.

Approach

The series was cleaned with Z-score outlier filtering, then engineered into a supervised problem: lagged demand values, cyclic time encodings (hour-of-day, day-of-week), and trend/seasonal decomposition components. Forecasting the target day works iteratively — each predicted half-hour feeds the lag features of the next. Three model families were validated on held-out data: LightGBM, XGBoost, and a 2-layer LSTM.

Result

Gradient boosting won decisively. LightGBM validated at RMSE 2.52 / MAPE 0.21% / R² 0.9995, ahead of XGBoost (RMSE 3.46, MAPE 0.36%) and far ahead of the LSTM (RMSE 16.59, MAPE 2.41%) — a useful reminder that for tabular time-series with good feature engineering, boosted trees remain the bar deep learning has to clear. The delivered report pairs the model comparison with a review of AI adoption in grid forecasting.

Honest note

These figures come from the delivered project report; the underlying series is a client-style dataset, so validation numbers describe this dataset, not a universal guarantee.

Need a similar system?

Describe your data and the decision it should support — you'll get a feasibility answer and a fixed quote.

Start a project →