gigl.utils.select_ssl_positive_label_edges#

gigl.utils.data_splitters.select_ssl_positive_label_edges(edge_index: Tensor, positive_label_percentage: float) Tensor#

Selects a percentage of edges from an edge index to use for self-supervised positive labels. Note that this function does not mask these labeled edges from the edge index tensor.

Args:

edge_index (torch.Tensor): Edge Index tensor of shape [2, num_edges] positive_label_percentage (float): Percentage of edges to select as positive labels

Returns:

torch.Tensor: Tensor of positive edges of shape [2, num_labels]