Introduction to Machine Learning for Energy Systems

MECH70039 guest lecture and hands-on machine-learning tutorial.
Course
MECH70039 · Data Science and Digitalisation
Programme
MSc Sustainable Energy Futures
Role
Guest Lecturer
Year
2025–26

This four-hour short course provides a practical introduction to machine learning for energy-system data. It combines a two-hour lecture with a two-hour hands-on tutorial.

Course materials

Lecture notes
Download PDF
Python tutorial
Open on GitHub

Module aims

Equip students with a practical ML toolkit for energy-data problems—including forecasting, classification, anomaly detection, and clustering—and the ability to reason about generalisation, model selection, and data quality in real pipelines.

Intended learning outcomes

By the end of the course, students should be able to:

  1. Formulate regression, classification, supervised-learning, and unsupervised-learning tasks in energy systems.
  2. Train and interpret baseline models including linear regression, logistic regression, and support-vector machines.
  3. Apply PCA and k-means for dimensionality reduction, visualisation, and clustering.
  4. Use appropriate regression and classification performance metrics and explain their trade-offs.
  5. Diagnose underfitting and overfitting, explain model capacity, and apply regularisation.
  6. Conduct hyperparameter tuning with correct training, validation, and test splits.
  7. Explain where reinforcement learning is relevant at a high level.
  8. Describe the motivation for foundation models, with emphasis on time-series models such as Chronos.
  9. Identify major energy and weather data sources and assess data-quality risks.

Content outline

  • ML framing for energy systems: renewables, inverter-dominated grids, operational data, and task taxonomy.
  • Supervised learning: linear regression, logistic regression, support-vector machines, and practical model fitting.
  • Unsupervised learning: PCA, k-means, visualisation, and anomaly discovery.
  • Evaluation and generalisation: MSE, classification metrics, capacity, overfitting, and regularisation.
  • Special topics: No Free Lunch intuition, time-series foundation models, and energy-data sources such as ENTSO-E and ERA5.

Hands-on tutorial

The open tutorial repository contains:

  • svm.py — binary classification with an SVM on a non-linearly separable dataset;
  • pca.py — PCA dimensionality reduction and visualisation;
  • kmeans+pca.py — k-means clustering followed by a two-dimensional PCA view; and
  • chronos_example.py — zero-shot energy-price forecasting with Amazon Chronos.

Students can run the examples in Google Colab or locally using NumPy, Matplotlib, scikit-learn, pandas, and chronos-forecasting.

Back to top