egc.utils.graph_augmentation package

Subpackages

Submodules

egc.utils.graph_augmentation.augs module

Graph Augmentation Adapted from https://github.com/PyGCL/PyGCL/blob/main/GCL/augmentors/augmentor.py

class egc.utils.graph_augmentation.augs.ComposeAug(augs: List[BaseTransform], cross: bool = True)[source]

Bases: BaseTransform

Execute graph augments in sequence.

Parameters:
  • augs (List[BaseTransform]) – graphs augments using DGL tansform

  • cross (bool, optional) – if use cross graph augments, by default True

class egc.utils.graph_augmentation.augs.RandomChoiceAug(augs: List[BaseTransform], n_choices: int, cross: bool = True)[source]

Bases: BaseTransform

Execute graph augments in random.

Parameters:
  • augs (List[BaseTransform]) – graphs augments using DGL tansform

  • n_choices (int) – number of choice aug types

  • cross (bool, optional) – if use cross graph augments, by default True

class egc.utils.graph_augmentation.augs.aug_none[source]

Bases: object

none aug

egc.utils.graph_augmentation.augs.get_augments(aug_types: List | None = None)[source]

Generate augments list.

Parameters:

aug_types (List) – str type list. Defaults to None. e.g. [‘random_mask:p=0.2’,’node_shuffle:is_use=True’]

Returns:

augs list

Return type:

augs (List)

Module contents

init