CoauthorDataset
¶
CoauthorDataset(
name: COAUTHOR_NAMES,
base_dir: Optional[str] = None,
pre_transform: Optional[Callable] = None,
transform: Optional[Callable] = None,
)
Bases: _NPZDataset
The Coauthor CS and Coauthor Physics co-authorship graphs from the "Pitfalls of Graph Neural Network Evaluation" paper, built from the Microsoft Academic Graph.
Nodes are authors, edges connect authors who co-authored a paper, node features are the keywords of each author's papers and the task is to predict each author's most active field of study.
The datasets come without train/validation/test split; create one with
e.g. RandomNodeSplit.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
COAUTHOR_NAMES
|
|
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 applied to the graph once, before it is saved. |
None
|
transform
|
Optional[Callable]
|
A function/transform applied to the graph at every access. |
None
|
Example:
from mlx_graphs.datasets import CoauthorDataset · mlx_graphs/datasets/npz_dataset.py