class_docstr: The signed graph convolutional network model from the `"Signed Graph
  Convolutional Network" <https://arxiv.org/abs/1808.06354>`_ paper.
  Internally, this module uses the
  :class:`torch_geometric.nn.conv.SignedConv` operator.
  
  Args:
      in_channels (int): Size of each input sample.
      hidden_channels (int): Size of each hidden sample.
      num_layers (int): Number of layers.
      lamb (float, optional): Balances the contributions of the overall
          objective. (default: :obj:`5`)
      bias (bool, optional): If set to :obj:`False`, all layers will not
          learn an additive bias. (default: :obj:`True`)
class_docstr_tok: ["The","signed","graph","convolutional","network","model","from","the","`","``","Signed","Graph","Convolutional","Network","''","<","https",":","\/\/arxiv.org\/abs\/1808.06354",">","`","_","paper",".","Internally",",","this","module","uses","the",":","class",":","`","torch_geometric.nn.conv.SignedConv","`","operator",".","Args",":","in_channels","(","int",")",":","Size","of","each","input","sample",".","hidden_channels","(","int",")",":","Size","of","each","hidden","sample",".","num_layers","(","int",")",":","Number","of","layers",".","lamb","(","float",",","optional",")",":","Balances","the","contributions","of","the","overall","objective",".","(","default",":",":","obj",":","`","5","`",")","bias","(","bool",",","optional",")",":","If","set","to",":","obj",":","`","False","`",",","all","layers","will","not","learn","an","additive","bias",".","(","default",":",":","obj",":","`","True","`",")"]
docstr: Evaluates node embeddings :obj:`z` on positive and negative test
  edges by computing AUC and F1 scores.
  
  Args:
      z (torch.Tensor): The node embeddings.
      pos_edge_index (torch.Tensor): The positive edge indices.
      neg_edge_index (torch.Tensor): The negative edge indices.
docstr_tok: ["Evaluates","node","embeddings",":","obj",":","`","z","`","on","positive","and","negative","test","edges","by","computing","AUC","and","F1","scores",".","Args",":","z","(","torch.Tensor",")",":","The","node","embeddings",".","pos_edge_index","(","torch.Tensor",")",":","The","positive","edge","indices",".","neg_edge_index","(","torch.Tensor",")",":","The","negative","edge","indices","."]
code: def test(
      self,
      z: Tensor,
      pos_edge_index: Tensor,
      neg_edge_index: Tensor,
  ) -> Tuple[float, float]:
      """Evaluates node embeddings :obj:`z` on positive and negative test
      edges by computing AUC and F1 scores.
  
      Args:
          z (torch.Tensor): The node embeddings.
          pos_edge_index (torch.Tensor): The positive edge indices.
          neg_edge_index (torch.Tensor): The negative edge indices.
      """
      from sklearn.metrics import f1_score, roc_auc_score
  
      with torch.no_grad():
          pos_p = self.discriminate(z, pos_edge_index)[:, :2].max(
              dim=1
          )[1]
          neg_p = self.discriminate(z, neg_edge_index)[:, :2].max(
              dim=1
          )[1]
      pred = (1 - torch.cat([pos_p, neg_p])).cpu()
      y = torch.cat(
          [
              pred.new_ones((pos_p.size(0))),
              pred.new_zeros(neg_p.size(0)),
          ]
      )
      pred, y = pred.numpy(), y.numpy()
  
      auc = roc_auc_score(y, pred)
      f1 = f1_score(y, pred, average="binary") if pred.sum() > 0 else 0
  
      return auc, f1
  
imports: from typing import Optional, Tuple
  import scipy.sparse
  import torch
  import torch.nn.functional
  from torch import Tensor
  from torch_geometric.nn import SignedConv
  from torch_geometric.utils import coalesce, negative_sampling, structured_negative_sampling
label_desc: Use image node_id 11 for calling the SignedGCN obj's underlying member method code with example usage: obj.test(z, pos_edge_index, neg_edge_index) and returns: auc,  f1