Transformer network for data imputation in electricity demand data

Research output: Contribution to journalArticlepeer-review

22 Downloads (Pure)


Load forecasting necessitates a significant amount of smart meter data. Several elements in this process, including device malfunctions and signal transmission issues, produce missing data gaps. Missing values in the dataset significantly influence the learning ability of machine learning algorithms, and they must be infilled before proceeding with any statistical analysis. This paper investigates the handling of missing values in demand data, and a new approach is developed for improving the performance of demand analytics, such as energy forecasting. The proposed model uses a transformer neural network to impute the missing values at various rates in the demand profile. Our model uses a k-means algorithm to fill in the missing values with proxy values in the dataset. The model is applied to two case-study residential house located in Cornwall and Fintry, United Kingdom. The developed algorithm is assessed for it potential for infilling missing values for three widely understood missing value scenarios: missing completely at random (MCAR), missing at random (MAR), and missing not at random (MNAR). The proposed model's imputed outputs are compared to the original dataset to assess model performance. The performance of the framework is compared with a selection of widely used statistical and machine learning models. The proposed transformer model shows significant improvements over the common linear method in all three scenarios (with 30% missing values), with percentage improvements ranging from approximately 49.71% to 57.52% for Cornwall dataset.
Original languageEnglish
Article number113675
JournalEnergy and Buildings
Early online date27 Oct 2023
Publication statusPublished - 1 Dec 2023


  • Clustering
  • Deep learning
  • Energy consumption data
  • Missing value imputation

ASJC Scopus subject areas

  • Mechanical Engineering
  • Electrical and Electronic Engineering
  • Building and Construction
  • Civil and Structural Engineering


Dive into the research topics of 'Transformer network for data imputation in electricity demand data'. Together they form a unique fingerprint.

Cite this