Model type: Gradient Boosting (LightGBM) dual-head architecture for residential half-hourly demand forecasting and spike prediction Language: English (UK) License: Apache-2.0 Repository:https://github.com/nestshift/nestshift-os Paper:A Multi-Agent, Local-First Edge AI Architecture for Autonomous Residential Energy Optimisation Under Dynamic Tariffs
Model Description
This repository contains two trained LightGBM regressors that form the Energy Agent forecasting core of the NestShift OS---a local-first, edge-deployable Home Energy Management System (HEMS).
model_demand_forecaster.pkl — Primary mean-prediction head. Forecasts household half-hourly energy demand (kWh) using 17 time-series features.
model_quantile_q90.pkl — Secondary quantile-regression head ($\alpha = 0.9$). Predicts the 90th percentile of demand, enabling proactive load-shedding before price spikes.
Both models are designed to run inference on a Raspberry Pi 5 (8 GB) in real time, with zero cloud dependency.
Intended Use
Primary: Residential energy demand forecasting for tariff-aware appliance scheduling (washing machine, dishwasher, EV charger, water heater).
Secondary: Demand-spike early-warning for demand-response and peak-shaving applications.
Deployment target: Edge hardware (Raspberry Pi 5, NVIDIA Jetson, or equivalent ARM/x86_64 Linux board).
Not suitable for: Industrial-scale load forecasting, sub-second real-time grid balancing, or non-UK households without retraining.
Training Data
Attribute
Value
Dataset
Low Carbon London (LCL) — UK Power Networks
Records
54,197 half-hourly readings
Households
20 (representative sample)
Date range
2011-12-06 to 2012-02-04
Geography
London, United Kingdom
Resolution
30 minutes
Train / Val / Test split
40,673 / 6,384 / 7,140 (walk-forward temporal)
Feature Engineering
Feature
Description
hour_of_day
0–23
day_of_week
0–6
month
1–12
lag_1h
Demand 1 half-hour ago
lag_24h
Demand 24 hours ago (48 steps)
lag_48h
Demand 48 hours ago (96 steps)
rolling_mean_6h
Mean over past 12 half-hours
rolling_mean_24h
Mean over past 48 half-hours
rolling_mean_7d
Mean over past 336 half-hours
hour_sin, hour_cos
Cyclical hour encoding
dow_sin, dow_cos
Cyclical day-of-week encoding
month_sin, month_cos
Cyclical month encoding
is_dtou
Binary: on Dynamic Time-of-Use tariff
acorn_code
ACORN demographic segment
Missing lag values at household boundaries are backfilled up to 96 steps.
Temporal bias: Trained on 2011–2012 data; modern smart-meter patterns may differ (more EVs, heat pumps, solar PV).
Geographic bias: London-centric; northern UK households with electric heating may exhibit higher winter variance.
Tariff bias: Evaluated on simulated Standard + DToU mix; real Octopus Agile or other dynamic tariffs may yield different savings.
Household size: Sample of 20 households; generalisation to >5-bedroom homes or shared accommodation is untested.
MAPE instability: MAPE is >50,000 % because near-zero readings in low-consumption periods create division-by-near-zero. Use MAE or R² for evaluation instead.