torch_geometric.datasets.AttributedGraphDataset

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

Bases: InMemoryDataset

A variety of attributed graph datasets from the “Scaling Attributed Network Embedding to Massive Graphs” paper.

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

  • name (str) – The name of the dataset ("Wiki", "Cora" "CiteSeer", "PubMed", "BlogCatalog", "PPI", "Flickr", "Facebook", "Twitter", "TWeibo", "MAG").

  • transform (callable, optional) – A function/transform that takes in an torch_geometric.data.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 torch_geometric.data.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

Wiki

2,405

17,981

4,973

17

Cora

2,708

5,429

1,433

7

CiteSeer

3,312

4,715

3,703

6

PubMed

19,717

44,338

500

3

BlogCatalog

5,196

343,486

8,189

6

PPI

56,944

1,612,348

50

121

Flickr

7,575

479,476

12,047

9

Facebook

4,039

88,234

1,283

193

TWeibo

2,320,895

9,840,066

1,657

8

MAG

59,249,719

978,147,253

2,000

100