v2.5.0
Datasets ⭐
EXAMPLE CODE
Electricity Dataset
Load Electricity dataset in Python fast with one line of code. 6 months of electricity consumption data. Stream Electricity Dataset while training ML models.

Electricity dataset

What is Electricity Dataset?

The Household electricity consumption dataset is a time series dataset that contains 260,640 values recorded between January 2007 and June 2007 (6 months). It is a subset of a bigger, unique chronicle that contains 2,075,259 estimations assembled between December 2006 and November 2010.

Download Electricity Dataset in Python

Instead of downloading the Electricity dataset in Python, you can effortlessly load it in Python via our open-source package Hub with just one line of code.

Load Electricity Dataset Training Subset in Python

1
import hub
2
ds = hub.load('hub://activeloop/household-power-consumption')
Copied!

Electricity Dataset Structure

Electricity Data Fields

  • date: tensor to represent the date.
  • time: tensor associated with the time.
  • global_active_power : tensor to represent the household global minute-averaged active power.
  • global_reactive_power: tensor to represent household global minute-averaged reactive power.
  • voltage: tensor to represent minute-averaged voltage.
  • global_intensity: tensor to represent household global minute-averaged current intensity.
  • sub_metering_1: tensor to represent energy sub-metering No. 1
  • sub_metering_2: tensor to represent energy sub-metering No. 2.
  • sub_metering_3: tensor to represent energy sub-metering No. 3.

Electricity Data Splits

  • The Electricity dataset training set is composed of 2,049,280 data points.

How to use Electricity Dataset with PyTorch and TensorFlow in Python

Train a model on Electricity dataset with PyTorch in Python

Let's use Hub's built-in PyTorch one-line dataloader to connect the data to the compute:
1
dataloader = ds.pytorch(num_workers=0, batch_size=4, shuffle=False)
Copied!

Train a model on Electricity dataset with TensorFlow in Python

1
dataloader = ds.tensorflow()
Copied!

Additional Information about Electricity Dataset

Electricity Dataset Description

Electricity Dataset Curators

Georges Hebrail Senior Researcher, EDF R&D, Clamart, France Alice Berard

Electricity Dataset Licensing Information

Hub users may have access to a variety of publicly available datasets. We do not host or distribute these datasets, vouch for their quality or fairness, or claim that you have a license to use the datasets. It is your responsibility to determine whether you have permission to use the datasets under their license.
If you're a dataset owner and do not want your dataset to be included in this library, please get in touch through a GitHub issue. Thank you for your contribution to the ML community!

Electricity Dataset Citation Information

1
@misc{Dua:2019 ,
2
author = "Dua, Dheeru and Graff, Casey",
3
year = "2017",
4
title = "{UCI} Machine Learning Repository",
5
url = "http://archive.ics.uci.edu/ml",
6
institution = "University of California, Irvine, School of Information and Computer Sciences" }
Copied!

Electricity Dataset FAQs

What is the Electricity dataset for Python?

The household electricity consumption dataset contains 260,640 estimations accumulated between January 2007 and June 2007 (6 months). It is a subset of a much larger time series dataset that has 2,075,259 measurements between December 2006 and November 2010 (i.e. 47 months).

How can I use the Electricity dataset in PyTorch or TensorFlow?

You can stream the Electricity dataset while training a model in PyTorch or TensorFlow with one line of code using the open-source package Activeloop Hub in Python. See detailed instructions on how to train a model on the Electricity dataset with PyTorch in Python or train a model on the Electricity dataset with TensorFlow in Python.