Teaching backpropagation at Data Science Retreat

I’m an Energy Data Scientist who likes to build models of energy systems in Python. Most of my work is around optimal dispatch of industrial scale energy systems, using constrained optimization or machine learning. I am particularly interested in the space that exists between economic and carbon optimization.

I have experience on industrial & district energy projects as an Energy Engineer at a international energy utility. I have also worked as a Data Scientist on price responsive demand side flexibility at an early stage clean tech company.

Currently I am the Director at Data Science Retreat - one of Europe’s oldest and advanced data science bootcamps. You can see the resources I use to teach there on GitHub.

I blog at adgefficiency.com, and maintain repositories of programming, reinforcement learning and machine learning resources on GitHub.

Contact me on LinkedIn or via email. Check out my work on GitHub.

Reinforcement learning for energy systems

blog post - github - DQN debugging, hyperparameter tuning and solving.

Mixed integer linear programming of battery storage and combined heat and power

blog post - github - measuring forecast quality

import energypylinear as epl
model = epl.Battery(power=2, capacity=4, efficiency=1.0)
prices = [10, 50, 10, 50, 10]
info = model.optimize(prices, timestep='30min')

UK and Australian grid data

The Australian grid is a unique combination of high coal penetrations, quality potential renewable resources (and high penetration in South Australia) and a deregulated, volatile electricity market. It also has good data availability - if you know where to look for it.

A hackers guide to AEMO data - Elexon API Web Scraping using Python - What is the UK Imbalance Price?

Combined heat and power

I spent four years working as an industrial energy engineer, and worked with a lot of CHP plant. energy-py-linear has a CHP model that can be configured with a number of gas and steam turbines, then optimized as a function of gas and electricity prices.

from energypylinear.chp import Boiler, GasTurbine, SteamTurbine

assets = [
	GasTurbine(size=10, name='gt1'),
	Boiler(size=100, name='blr1'),
	Boiler(size=100, name='blr2', efficiency=0.9),
	SteamTurbine(size=6, name='st1')

info = optimize(

CHP Cheat Sheet - Gas Engines & Gas Turbines - Four Negative Effects of High Return Temperatures


I’m an energy engineer at heart. Some of my most popular work is the Energy Basics series - such as the heat equation and kW versus kWh.

I’ve also written about Average versus Marginal Carbon Emissions, the Four Inconvenient Truths of the Clean Energy Transition and the intersection of energy and machine learning.

Parallelized Cross Entropy Method


CEM on CartPole and Pendulum. Parallelized across processes and through batch.

$ python cem.py cartpole --num_process 6 --epochs 8 --batch_size 4096

$ python cem.py pendulum --num_process 6 --epochs 15 --batch_size 4096


April 3 2017 - Berlin Machine Learning Group - A Glance at Q-Learning - meetup page - youtube

June 21 2017 - Data Science Festival - A Glance at Q-Learning - meetup page - youtube

September 3 2018 - Berlin Machine Learning Group - energy-py - meetup page - slides - GitHub repo