dgld.models.ANEMONE.dataset

class dgld.models.ANEMONE.dataset.CoLADataSet(g, subgraphsize=4)[source]

Bases: DGLDataset

CoLA Dataset to generate subgraph for train and inference.

Parameters
  • g (dgl.graph) – graph to generate subgraph

  • subgraphsize (int) – size of subgraph, default 4

graph_transform(g)[source]

functions to transfrom graph

Parameters

g (DGL.Graph) – the graph to transform

Returns

newg – the graph after transform

Return type

DGL.Graph

normalize_feat()[source]

functions to normalize the features of nodes in graph

process()[source]

nonsense

random_walk_sampling()[source]

functions to get random walk from target nodes

dgld.models.ANEMONE.dataset.safe_add_self_loop(g)[source]

Add the self loop in g :param g: the graph to add self loop :type g: DGL.graph

Returns

newg – the graph has been added self loop

Return type

DGL.Graph