Skip to content

πŸ”‹ Time Series Forecasting for Energy Demand Spike Prediction πŸ”‹

License

Notifications You must be signed in to change notification settings

thbuerg/spike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

53 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Time Series Forecasting for Energy Demand Spike Prediction (SPIKE)

CI testing Python 3.6

πŸ”‹πŸ”‹πŸ”Œ

Description

Deep Learning model to predict spikes in energy demand based on historical environmental and power consumption data. Hyperparameters are controlled via hydra and Logging is done with neptune.

Model currently implemented is a LSTM taking the last 7 days of environmental (Temperature, Windspeeds, Solargobalradiation) and power consumption data in 15-minute resolution. The model predicts the expected time of the daily maximum in electrical load in a 15 minute interval between 7AM and 8PM.

Energy data is retrieved from German Energy Providers, in this case the Thueringer Energienetze. Weather data is retrieved from the German Weather Forecasting Service Deutscher Wetterdienst.

Currently data is limited to 1y of data.

How to run

First, install dependencies (before you do that, install Miniconda.)

# clone spike   
git clone https://github.com/thbuerg/spike

# install dependencies
cd spike
conda env create -f environment.yml

# install spike
pip install -e .

If you want to log to neptune, make sure your Neptune.ai API token is exported to the environment

Next, navigate to train.py and execute it.

# module folder
cd spike/spike/

# run preprocessing
python preprocessing.py +experiment.filepath=/path/to/your/data/

# run module 
python train.py \
 +experiment.filepath=/path/to/your/data/data_normed.csv \
 +trainer.default_root_dir=/path/to/your/results/ \
 +trainer.num_sanity_val_steps=1 +trainer.max_epochs=100 trainer.gpus=[0] experiment.batch_size=128 experiment.learning_rate=0.001

Citation

@article{Time Series Forecasting for Energy Demand Spike Prediction (SPIKE),
  title={Time Series Forecasting for Energy Demand Spike Prediction (SPIKE)},
  author={Thore Buergel},
  journal={github},
  year={2021}
}