class dgl.transforms.AddEdge(ratio=0.2)[source]

Bases: dgl.transforms.module.BaseTransform

Randomly add edges, as described in Graph Contrastive Learning with Augmentations.

Parameters

ratio (float, optional) – Number of edges to add divided by the number of existing edges.

Example

>>> import dgl

>>> transform = AddEdge()