torch_geometric.datasets.CityNetwork

class CityNetwork(root: str, name: str, augmented: bool = True, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, force_reload: bool = False, delete_raw: bool = False)[source]

Bases: InMemoryDataset

The City-Networks are introduced in “Towards Quantifying Long-Range Interactions in Graph Machine Learning: a Large Graph Dataset and a Measurement” paper. The dataset contains four city networks: paris, shanghai, la, and ‘london’, where nodes represent junctions and edges represent directed road segments. The task is to predict each node’s eccentricity score, which is approximated based on its 16-hop neighborhood. The score indicates how accessible one node is in the network, and is mapped to 10 quantiles for transductive classification. See the original source code for more details on the individual networks.

Parameters:
  • root (str) – Root directory where the dataset should be saved.

  • name (str) – The name of the dataset ("paris", "shanghai", "la", "london").

  • augmented (bool, optional) – Whether to use the augmented node features from edge features.(default: True)

  • transform (callable, optional) – A function/transform that takes in an Data object and returns a transformed version. The data object will be transformed before every access. (default: None)

  • pre_transform (callable, optional) – A function/transform that takes in an Data object and returns a transformed version. The data object will be transformed before being saved to disk. (default: None)

  • force_reload (bool, optional) – Whether to re-process the dataset. (default: False)

STATS:

Name

#nodes

#edges

#features

#classes

paris

114,127

182,511

37

10

shanghai

183,917

262,092

37

10

la

240,587

341,523

37

10

london

568,795

756,502

37

10