MCPcopy Index your code
hub / github.com/PyGCL/PyGCL / get_degree_weights

Function get_degree_weights

GCL/augmentors/functional.py:152–158  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

150
151
152def get_degree_weights(data):
153 edge_index_ = to_undirected(data.edge_index)
154 deg = degree(edge_index_[1])
155 deg_col = deg[data.edge_index[1]].to(torch.float32)
156 scaled_deg_col = torch.log(deg_col)
157
158 return normalize(scaled_deg_col), deg
159
160
161def get_pagerank_weights(data, aggr: str = 'sink', k: int = 10):

Callers

nothing calls this directly

Calls 1

normalizeFunction · 0.90

Tested by

no test coverage detected