torch_geometric.datasets.graph_generator.BAGraph

class BAGraph(num_nodes: int, num_edges: int)[source]

Bases: GraphGenerator

Generates random Barabasi-Albert (BA) graphs. See barabasi_albert_graph() for more information.

Parameters:
  • num_nodes (int) – The number of nodes.

  • num_edges (int) – The number of edges from a new node to existing nodes.