torch_geometric.datasets.BAShapes
- class BAShapes(connection_distribution: str = 'random', transform: Optional[Callable] = None)
Bases:
BAShapes
The 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
BAShapes
is deprecated and will be removed in a future release. UseExplainerDataset
in combination withtorch_geometric.datasets.graph_generator.BAGraph
instead.- 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.Data
object and returns a transformed version. The data object will be transformed before every access. (default:None
)