class_docstr: 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 :class:`~dgl.DGLGraph` object and returns
      a transformed version. The :class:`~dgl.DGLGraph` object will be
      transformed before every access.
  
  Attributes
  ----------
  num_classes : int
      Number of node classes
  
  Examples
  --------
  >>> dataset = KarateClubDataset()
  >>> num_classes = dataset.num_classes
  >>> g = dataset[0]
  >>> labels = g.ndata['label']
class_docstr_tok: ["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",":","class",":","`","~dgl.DGLGraph","`","object","and","returns","a","transformed","version",".","The",":","class",":","`","~dgl.DGLGraph","`","object","will","be","transformed","before","every","access",".","Attributes","--","--","--","--","--","num_classes",":","int","Number","of","node","classes","Examples","--","--","--","--",">",">",">","dataset","=","KarateClubDataset","(",")",">",">",">","num_classes","=","dataset.num_classes",">",">",">","g","=","dataset","[","0","]",">",">",">","labels","=","g.ndata","[","'label","'","]"]
docstr: Number of classes.
docstr_tok: ["Number","of","classes","."]
code: def num_classes(self):
      """Number of classes."""
      return 2
  
file_path: dgl/python/dgl/data/karate.py
imports: import networkx
  import numpy
  from ..None import backend
  from ..convert import from_networkx
  from .dgl_dataset import DGLDataset
  from .utils import deprecate_property
label_desc: Use image node_id 3 for calling the KarateClubDataset obj's underlying member method code with example usage: obj.num_classes() and returns: int