Overview of ML Load Prediction
mainPredbat features a machine learning component that uses a lightweight multi-layer perceptron (MLP) neural network to predict household energy consumption for the next 48 hours in 5-minute intervals.
The model learns from:
- Historical load patterns
- Time-of-day and day-of-week patterns
- Historical PV generation (optional)
- Temperature forecasts (optional)
- Historical and future energy import/export rates
Key technical characteristics:
- Implementation: Pure NumPy (no heavy deep learning frameworks required).
- Architecture: Deep neural network with 3 hidden layers containing [512, 256, 64] neurons.
- Optimization: Uses He initialization and AdamW weight decay.
- Training Lifecycle: Automatically trains on historical data (requires $\ge$ 1 day, 7+ days recommended). It fine-tunes every 2 hours using the full dataset to adapt to changing patterns. It uses time-weighted training to prioritize recent data.
- Persistence: The model persists across restarts and falls back gracefully if predictions are unreliable.