torch_geometric.datasets.FakeHeteroDataset

class FakeHeteroDataset(num_graphs: int = 1, num_node_types: int = 3, num_edge_types: int = 6, avg_num_nodes: int = 1000, avg_degree: float = 10.0, avg_num_channels: int = 64, edge_dim: int = 0, num_classes: int = 10, task: str = 'auto', transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, **kwargs: Union[int, Tuple[int, ...]])[source]

Bases: InMemoryDataset

A fake dataset that returns randomly generated HeteroData objects.

Parameters:
  • num_graphs (int, optional) – The number of graphs. (default: 1)

  • num_node_types (int, optional) – The number of node types. (default: 3)

  • num_edge_types (int, optional) – The number of edge types. (default: 6)

  • avg_num_nodes (int, optional) – The average number of nodes in a graph. (default: 1000)

  • avg_degree (float, optional) – The average degree per node. (default: 10.0)

  • avg_num_channels (int, optional) – The average number of node features. (default: 64)

  • edge_dim (int, optional) – The number of edge features. (default: 0)

  • num_classes (int, optional) – The number of classes in the dataset. (default: 10)

  • task (str, optional) – Whether to return node-level or graph-level labels ("node", "graph", "auto"). If set to "auto", will return graph-level labels if num_graphs > 1, and node-level labels other-wise. (default: "auto")

  • transform (callable, optional) – A function/transform that takes in an torch_geometric.data.HeteroData object and returns a transformed version. The data object will be transformed before every access. (default: None)

  • **kwargs (optional) – Additional attributes and their shapes e.g. global_features=5.