N-BEATS Energy Price Forecaster
Generic (univariate) N-BEATS model for short-term Dutch day-ahead electricity price forecasting.
Part of the OpenRemote Energy Price Forecasting research project, evaluated as a baseline
alongside Prophet and an Encoder-Decoder Transformer (Nazim112/nl-energy-forecaster).
Model details
- Architecture: Generic N-BEATS โ 6 stacked residual blocks, each a 4-layer MLP (hidden size 256)
- Input: last 168 hourly price values (EUR/MWh), univariate โ no exogenous features
- Output: next 48 hourly price values (EUR/MWh)
- Parameters: ~1.78M
- Framework: PyTorch
Training
- Dataset: CitrusBoy/EnergyPriceForecasting (2015โ2025, Dutch day-ahead prices + weather/load features, though this model only uses price)
- Split: 85% train / 15% test, chronological
- Lookback / horizon: 168 / 48 hours
- Window stride: 6 hours (subsampled for faster training)
- Optimizer: Adam, lr=1e-3
- Early stopping: patience=4 on validation loss, stopped at epoch 10/15
Test set results
| Metric | Value |
|---|---|
| MAE | 25.06 EUR/MWh |
| RMSE | 37.44 EUR/MWh |
Usage
from huggingface_hub import snapshot_download
import sys, numpy as np
repo_dir = snapshot_download("a-niko22/nbeats-energy-forecaster")
sys.path.insert(0, repo_dir)
from predict import load_model, predict
bundle = load_model(repo_dir)
# X: last 168 hourly prices (EUR/MWh), unscaled, most recent value last
X = np.array([...]) # shape (168,)
forecast = predict(bundle, X) # shape (48,) โ next 48 hours, EUR/MWh
Limitations
- Univariate: does not use weather, load, or generation features, unlike the NBEATSx variant used elsewhere in this project.
- Trained on data through 2025; forecasts for periods with unusual market conditions (e.g. extreme negative-price events) may be less reliable.
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support