WindmillOutputDataLoader

class stgraph.dataset.WindmillOutputDataLoader(verbose: bool = False, lags: int = 8, cutoff_time: int | None = None, size: str = 'large', redownload: bool = False)[source]

Bases: STGraphTemporalDataset

Hourly energy output of windmills.

This class provides functionality for loading, processing, and accessing the Windmill output dataset for use in deep learning such as regression tasks.

gdata for Windmill Output Small

num_nodes

num_edges

total_timestamps

11

121

17472

gdata for Windmill Output Medium

num_nodes

num_edges

total_timestamps

26

676

17472

gdata for Windmill Output Large

num_nodes

num_edges

total_timestamps

319

101761

17472

Example

from stgraph.dataset import WindmillOutputDataLoader

wind_small = WindmillOutputDataLoader(verbose=True, size="small")
num_nodes = wind_small.gdata["num_nodes"]
num_edges = wind_small.gdata["num_edges"]
total_timestamps = wind_small.gdata["total_timestamps"]

edge_list = wind_small.get_edges()
edge_weights = wind_small.get_edge_weights()
targets = wind_small.get_all_targets()
Parameters:
  • verbose (bool, optional) – Flag to control whether to display verbose info (default is False)

  • lags (int, optional) – The number of time lags (default is 8)

  • cutoff_time (int, optional) – The cutoff timestamp for the temporal dataset (default is None)

  • size (str, optional) – The dataset size among large, medium and small (default is large)

  • redownload (bool, optional (default is False)) – Redownload the dataset online and save to cache

name

The name of the dataset.

Type:

str

gdata

Graph meta data.

Type:

dict

get_all_targets() list[source]

Return the targets for each timestamp.

get_edge_weights() ndarray[source]

Return the edge weight.

get_edges() list[source]

Return the edge list.