torch_geometric.datasets.HeterophilousGraphDataset
- class HeterophilousGraphDataset(root: str, name: str, transform: Optional[Callable] = None, pre_transform: Optional[Callable] = None, force_reload: bool = False)[source]
Bases:
InMemoryDataset
The heterophilous graphs
"Roman-empire"
,"Amazon-ratings"
,"Minesweeper"
,"Tolokers"
and"Questions"
from the “A Critical Look at the Evaluation of GNNs under Heterophily: Are We Really Making Progress?” paper.- Parameters:
root (str) – Root directory where the dataset should be saved.
name (str) – The name of the dataset (
"Roman-empire"
,"Amazon-ratings"
,"Minesweeper"
,"Tolokers"
,"Questions"
).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
)pre_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 being saved to disk. (default:None
)force_reload (bool, optional) – Whether to re-process the dataset. (default:
False
)
STATS:
Name
#nodes
#edges
#features
#classes
Roman-empire
22,662
32,927
300
18
Amazon-ratings
24,492
93,050
300
5
Minesweeper
10,000
39,402
7
2
Tolokers
11,758
519,000
10
2
Questions
48,921
153,540
301
2