PedalMeDataLoader

class stgraph.dataset.PedalMeDataLoader(verbose: bool = False, lags: int = 4, cutoff_time: int | None = None, redownload: bool = False)[source]

Bases: STGraphTemporalDataset

PedalMe Bicycle deliver orders in London.

This class provides functionality for loading, processing, and accessing the PedalMe dataset for use in deep learning tasks such as node classification.

gdata

num_nodes

num_edges

total_timestamps

15

225

36

Example

from stgraph.dataset import PedalMeDataLoader

pedal = PedalMeDataLoader(verbose=True)
num_nodes = pedal.gdata["num_nodes"]
num_edges = pedal.gdata["num_edges"]
total_timestamps = pedal.gdata["total_timestamps"]

edge_list = pedal.get_edges()
edge_weights = pedal.get_edge_weights()
targets = pedal.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 4)

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

  • 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() ndarray[source]

Return the targets for each timestamp.

get_edge_weights() ndarray[source]

Return the edge weights.

get_edges() list[source]

Return the edge list.