add_sup_noises

class add_sup_noises(dataset: Dataset, noise_ratio: float, src_gid: int = 0, dst_gid: int = 1, seed: int | None = None, inplace: bool = False)[source]

Bases:

Add supervision noise to graphs in a PlanetAlign dataset by injecting noisy anchors.

Parameters:
  • dataset (Dataset) – The input dataset containing graphs.

  • noise_ratio (float) – The ratio of supervision to perturb.

  • src_gid (int, optional) – The graph ID of the source graph. Default is 0.

  • dst_gid (int, optional) – The graph ID of the destination graph. Default is 1.

  • seed (int, optional) – Random seed for reproducibility.

  • inplace (bool, optional) – If True, modify the dataset in place. Otherwise, return a new dataset.

Returns:

The dataset with perturbed supervision.

Return type:

PyG dataset