KarateClubDatasetο
- class dgl.data.KarateClubDataset(transform=None)[source]ο
Bases:
DGLDataset
Karate Club dataset for Node Classification
Zacharyβs karate club is a social network of a university karate club, described in the paper βAn Information Flow Model for Conflict and Fission in Small Groupsβ by Wayne W. Zachary. The network became a popular example of community structure in networks after its use by Michelle Girvan and Mark Newman in 2002. Official website: http://konect.cc/networks/ucidata-zachary/
Karate Club dataset statistics:
Nodes: 34
Edges: 156
Number of Classes: 2
- Parameters:
transform (callable, optional) β A transform that takes in a
DGLGraph
object and returns a transformed version. TheDGLGraph
object will be transformed before every access.
Examples
>>> dataset = KarateClubDataset() >>> num_classes = dataset.num_classes >>> g = dataset[0] >>> labels = g.ndata['label']