MCPcopy Create free account
hub / github.com/PyGCL/PyGCL / augment

Method augment

GCL/augmentors/rw_sampling.py:11–16  ·  view source on GitHub ↗
(self, g: Graph)

Source from the content-addressed store, hash-verified

9 self.walk_length = walk_length
10
11 def augment(self, g: Graph) -> Graph:
12 x, edge_index, edge_weights = g.unfold()
13
14 edge_index, edge_weights = random_walk_subgraph(edge_index, edge_weights, batch_size=self.num_seeds, length=self.walk_length)
15
16 return Graph(x=x, edge_index=edge_index, edge_weights=edge_weights)

Callers

nothing calls this directly

Calls 3

random_walk_subgraphFunction · 0.90
GraphClass · 0.90
unfoldMethod · 0.80

Tested by

no test coverage detected