torch_geometric_signed_directed.utils.directed.DiGCL_utils

Functions

drop_feature(x, drop_prob)

Drop feature funciton from the

pred_digcl_node(embeddings, y, train_index[, test_index])

Generate predictions from embeddings from the

pred_digcl_link(embeddings, y, train_index, test_index)

Generate predictions from embeddings from the

Module Contents

drop_feature(x: torch.FloatTensor, drop_prob: float)

Drop feature funciton from the Directed Graph Contrastive Learning paper.

Arg types:
  • x (PyTorch FloatTensor) - Node features.

  • drop_prob (float) - Feature drop probability.

Return types:
  • x (PyTorch FloatTensor) - Node features.

pred_digcl_node(embeddings: torch.FloatTensor, y: torch.LongTensor, train_index: List[int], test_index: List[int] = None)

Generate predictions from embeddings from the Directed Graph Contrastive Learning paper.

Arg types:
  • embeddings (PyTorch FloatTensor) - Node embeddings.

  • y (PyTorch LongTensor) - Labels.

  • train_index (NumPy array) - Training index.

  • test_index (NumPy array) - Testing index.

Return types:
  • y_pred (NumPy array) - Predicted labels.

Generate predictions from embeddings from the Directed Graph Contrastive Learning paper.

Arg types:
  • embeddings (PyTorch FloatTensor) - Node embeddings.

  • y (PyTorch LongTensor) - Labels.

  • train_index (NumPy array) - Training index.

  • test_index (NumPy array) - Testing index.

Return types:
  • y_pred (NumPy array) - Predicted labels.