ActorDataset

class dgl.data.ActorDataset(raw_dir=None, force_reload=False, verbose=True, transform=None)[source]

Bases: dgl.data.dgl_dataset.DGLBuiltinDataset

Actor-only induced subgraph of the film-directoractor-writer network from Social Influence Analysis in Large-scale Networks <https://dl.acm.org/doi/10.1145/1557019.1557108>, introduced by Geom-GCN: Geometric Graph Convolutional Networks <https://arxiv.org/abs/2002.05287>

Nodes represent actors, and edges represent co-occurrence on the same Wikipedia page. Node features correspond to some keywords in the Wikipedia pages.

Statistics:

  • Nodes: 7600

  • Edges: 33391

  • Number of Classes: 5

  • 10 train/val/test splits

    • Train: 3648

    • Val: 2432

    • Test: 1520

Parameters
  • raw_dir (str, optional) – Raw file directory to store the processed data. Default: ~/.dgl/

  • force_reload (bool, optional) – Whether to re-download the data source. Default: False

  • verbose (bool, optional) – Whether to print progress information. Default: True

  • transform (callable, optional) – A transform that takes in a DGLGraph object and returns a transformed version. The DGLGraph object will be transformed before every access. Default: None

num_classes

Number of node classes

Type

int

Notes

The graph does not come with edges for both directions.

__getitem__(idx)[source]

Gets the data object at index.

__len__()[source]

The number of examples in the dataset.