Draco Data Format

December 13, 2021 ยท View on GitHub

Input

The minimum input expected by the Draco system consists of the following two elements, which need to be passed as pandas.DataFrame objects:

Target Times

A table containing the specification of the problem that we are solving, which has three columns:

  • turbine_id: Unique identifier of the turbine which this label corresponds to.
  • cutoff_time: Time associated with this target
  • target: The value that we want to predict. This can either be a numerical value or a categorical label. This column can also be skipped when preparing data that will be used only to make predictions and not to fit any pipeline.
turbine_idcutoff_timetarget
0T12001-01-02 00:00:000
1T12001-01-03 00:00:001
2T22001-01-04 00:00:000

Readings

A table containing the signal data from the different sensors, with the following columns:

  • turbine_id: Unique identifier of the turbine which this reading comes from.
  • signal_id: Unique identifier of the signal which this reading comes from.
  • timestamp (datetime): Time where the reading took place, as a datetime.
  • value (float): Numeric value of this reading.
turbine_idsignal_idtimestampvalue
0T1S12001-01-01 00:00:001
1T1S12001-01-01 12:00:002
2T1S12001-01-02 00:00:003
3T1S12001-01-02 12:00:004
4T1S12001-01-03 00:00:005
5T1S12001-01-03 12:00:006
6T1S22001-01-01 00:00:007
7T1S22001-01-01 12:00:008
8T1S22001-01-02 00:00:009
9T1S22001-01-02 12:00:0010
10T1S22001-01-03 00:00:0011
11T1S22001-01-03 12:00:0012

Turbines

Optionally, a third table can be added containing metadata about the turbines. The only requirement for this table is to have a turbine_id field, and it can have an arbitraty number of additional fields.

turbine_idmanufacturer.........
0T1Siemens.........
1T2Siemens.........

CSV Format

As explained in a previous section, the input expected by the Draco system consists of two tables which need to be passed as pandas.DataFrame objects:

  • The target_times table, which containing the specification of the problem that we are solving in the form of training examples with a turbine_id, a cutoff_time and a target value.
  • The readings table, which contains the signal readings from the different sensors, with turbine_id, signal_id, timestamp and value fields.

However, in most scenarios the size of the available will far exceed the memory limitations of the system on which Draco is being run, so loading all the data in a single pandas.DataFrame will not be possible.

In order to solve this situation, Draco provides a CSVLoader class which can be used to load data from what we call the Raw Data Format.

Raw Data Format

The Raw Data Format consists on a collection of CSV files stored in a single folder with the following structure:

Folder Structure

  • All the data from all the turbines is inside a single folder, which here we will call readings.
  • Inside the readings folder, one folder exists for each turbine, named exactly like the turbine:
    • readings/T001
    • readings/T002
    • ...
  • Inside each turbine folder one CSV file exists for each month, named %Y-%m.csv.
    • readings/T001/2010-01.csv
    • readings/T001/2010-02.csv
    • readings/T001/2010-03.csv
    • ...

CSV Contents

  • Each CSV file contains three columns:
    • signal_id: name or id of the signal.
    • timestamp: timestamp of the reading formatted as %m/%d/%y %H:%M:%S.
    • value: value of the reading.

This is an example of what a CSV contents look like:

signal_idtimestampvalue
0S101/01/01 00:00:001
1S101/01/01 12:00:002
2S101/02/01 00:00:003
3S101/02/01 12:00:004
4S101/03/01 00:00:005
5S101/03/01 12:00:006
6S201/01/01 00:00:007
7S201/01/01 12:00:008
8S201/02/01 00:00:009
9S201/02/01 12:00:0010
10S201/03/01 00:00:0011
11S201/03/01 12:00:0012