-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathconstants.py
More file actions
159 lines (151 loc) · 4.48 KB
/
Copy pathconstants.py
File metadata and controls
159 lines (151 loc) · 4.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
from ctypes import resize
import sys
import torch
from collections import defaultdict
from pathlib import Path
sys.path.append("./Heterophilic_Benchmarks")
GRAPH_MODELS = {
"ACM": [
("Critical Look", "critical"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"BernNet": [
("Critical Look", "critical"),
("Large Scale", "large"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"FAGCN": [
("Critical Look", "critical"),
("Large Scale", "large"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"FSGCN": [
("Critical Look", "critical"),
("Geometric", "geom"),
("Large Scale", "large"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"GBKGNN": [
("Critical Look", "critical"),
("Geometric", "geom"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"APPNP": [
("Critical Look", "critical"),
("Large Scale", "large"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"H2GCN": [
("Critical Look", "critical"),
("Large Scale", "large"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
],
"LinkX": [
("Critical Look", "critical"),
("Large Scale", "large"),
("OpenGSL", "opengsl"),
("PathNet", "pathnet")
]
}
DATASETS = {
"critical": [
('Actor', 'actor'),
('Amazon-Ratings', 'amazon-ratings'),
('Chameleon', 'chameleon'),
('Chameleon-Directed', 'chameleon-directed'),
('Chameleon-Filtered', 'chameleon-filtered'),
('Chameleon-Filtered-Directed', 'chameleon-filtered-directed'),
('Cornell', 'cornell'),
('Minesweeper', 'minesweeper'),
('Roman-Empire', 'roman-empire'),
('Questions', 'questions'),
('Squirrel', 'squirrel'),
('Squirrel-Directed', 'squirrel-directed'),
('Squirrel-Filtered', 'squirrel-filtered'),
('Squirrel-Filtered-Directed', 'squirrel-filtered-directed'),
('Texas', 'texas'),
('Texas-4-Classes', 'texas-4-classes'),
('Tolokers', 'tolokers'),
('Wisconsin', 'wisconsin')
],
"geom": [
('Arxiv-Year', 'arxiv-year'),
('Chameleon', 'chameleon'),
('CiteSeer', 'CiteSeer'),
('Cornell', 'cornell'),
('Cora', 'Cora'),
('Deezer-Europe', 'deezer-europe'),
('Film', 'film'),
('Genius', 'genius'),
('Penn94', 'penn94'),
('Pokec', 'pokec'),
('PubMed', 'PubMed'),
('Snap-Patents', 'snap-patents'),
('Squirrel', 'squirrel'),
('Texas', 'texas'),
('Twitch-Gamers', 'twitch-gamers'),
('Wisconsin', 'wisconsin')
],
"large": [
('Arxiv-Year', 'arxiv-year'),
('Chameleon', 'chameleon'),
('Citeseer', 'CiteSeer'),
('Cora', 'Cora'),
('Cornell', 'cornell'),
('Film', 'film'),
('Fb100', 'fb100'),
('Genius', 'genius'),
('Ogbn-Arxiv', 'ogbn-arxiv'),
('Ogbn-Products', 'ogbn-products'),
('Ogbn-Proteins', 'ogbn-proteins'),
('Pokec', 'pokec'),
('Pubmed', 'PubMed'),
('Snap-Patents', 'snap-patents'),
('Squirrel', 'squirrel'),
('Texas', 'texas'),
('Twitch-E', 'twitch-e'),
('Twitch-Gamer', 'twitch-gamer'),
('Wiki', 'wiki'),
('Wisconsin', 'wisconsin'),
('Yelp-Chi', 'yelp-chi')
],
"opengsl": [
('Blogcatalog', 'blogcatalog'),
('Flickr', 'flickr'),
('Wiki-Cooc', 'wiki-cooc')
],
"pathnet": [
('Bgp', 'Bgp'),
('Electronics', 'Electronics'),
('Nba', 'Nba')
]
}
HETEROPHILY_METRICS = {
"node": "Node Homophily",
"edge": "Edge Homophily",
"class": "Class Homophily",
"ge": "Generalized Edge Homophily",
"agg": "Aggregation Homophily",
"adjust": "Adjusted Homophily",
"li": "Label informativeness",
"ne": "Neighborhood Identifiability",
"gnb": "Gaussian Naive Bayes",
"kernel_reg0": "Kernel Linear Regression",
"kernel_reg1": "Kernel Non-linear Regression",
}
def _load_all_metric_results() -> dict:
RES_DIR_PATH = "./Heterophilic_Benchmarks/metrics_results"
res = {
"PA": torch.load(f'{RES_DIR_PATH}/PA.pt'),
"RG": torch.load(f'{RES_DIR_PATH}/RG.pt'),
"GenCat": torch.load(f'{RES_DIR_PATH}/Gencat.pt'),
}
return res
ALL_METRICS_RESULTS = _load_all_metric_results()