torch_geometric.datasets.BAShapes
- class BAShapes(connection_distribution: str = 'random', transform: Optional[Callable] = None)
Bases:
BAShapesThe BA-Shapes dataset from the “GNNExplainer: Generating Explanations for Graph Neural Networks” paper, containing a Barabasi-Albert (BA) graph with 300 nodes and a set of 80 “house”-structured graphs connected to it.
Warning
BAShapesis deprecated and will be removed in a future release. UseExplainerDatasetin combination withtorch_geometric.datasets.graph_generator.BAGraphinstead.- Parameters
connection_distribution (str, optional) – Specifies how the houses and the BA graph get connected. Valid inputs are
"random"(random BA graph nodes are selected for connection to the houses), and"uniform"(uniformly distributed BA graph nodes are selected for connection to the houses). (default:"random")transform (callable, optional) – A function/transform that takes in an
torch_geometric.data.Dataobject and returns a transformed version. The data object will be transformed before every access. (default:None)