H2GB.sampler.get_GrashSAINTRandomWalkLoader

sampler.get_GrashSAINTRandomWalkLoader(batch_size, shuffle=True, split='train')

A homogeneous random-walk based graph sampler from the “GraphSAINT: Graph Sampling Based Inductive Learning Method” paper. Given a graph in a data object, this class samples nodes and constructs subgraphs that can be processed in a mini-batch fashion. Normalization coefficients for each mini-batch are given via node_norm and edge_norm data attributes.

Parameters:
  • dataset (Any) – A InMemoryDataset dataset object.

  • batch_size (int) – The number of seed nodes (first nodes in the batch).

  • shuffle (bool) – Whether to shuffle the data or not (default: True).

  • split (str) – Specify which data split (train, val, test) is for this sampler. This determines some sampling parameter loaded from the configuration file, such as iter_per_epoch.