HeteroDataset
¶
HeteroDataset(
name: str,
base_dir: Optional[str] = None,
pre_transform: Optional[Callable] = None,
transform: Optional[Callable] = None,
)
Bases: BaseDataset
A dataset class for handling heterogeneous graph data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
name of the dataset |
required |
base_dir
|
Optional[str]
|
Directory where to store dataset files. Default is
in the local directory |
None
|
pre_transform
|
Optional[Callable]
|
A function/transform that takes in a |
None
|
transform
|
Optional[Callable]
|
A function/transform that takes in a |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
num_node_features |
dict[str, int]
|
Returns a dictionary of the number of node features for each node type. |
num_edge_features |
dict[str, int]
|
Returns a dictionary of the number of edge features for each edge type. |
num_graph_features |
int
|
Returns the number of graph features. |
num_node_classes |
Union[dict[str, int], None]
|
Returns a dictionary of the number of node classes for each node type. |
num_edge_classes |
dict[Any, int]
|
Returns a dictionary of the number of edge classes for each edge type. |
num_nodes |
dict[str, int]
|
Returns a dictionary of the number of nodes for each node type. |
num_edges |
dict[Any, int]
|
Returns a dictionary of the number of edges for each edge type. |
Source code in mlx_graphs/datasets/hetero_dataset.py
num_node_features
property
¶
Returns a dictionary of the number of node features for each node type.
num_edge_features
property
¶
Returns a dictionary of the number of edge features for each edge type.
num_node_classes
property
¶
Returns a dictionary of the number of node classes for each node type.
num_edge_classes
property
¶
Returns a dictionary of the number of edge classes for each edge type.
num_nodes
property
¶
Returns a dictionary of the number of nodes for each node type.
from mlx_graphs.datasets import HeteroDataset · mlx_graphs/datasets/hetero_dataset.py