docstr: compute rocauc
docstr_tok: ["compute","rocauc"]
code: def _eval_rocauc(self, y_pred_pos, y_pred_neg, type_info):
      """
      compute rocauc
      """
      if type_info == "torch":
          y_pred_pos_numpy = y_pred_pos.cpu().numpy()
          y_pred_neg_numpy = y_pred_neg.cpu().numpy()
      else:
          y_pred_pos_numpy = y_pred_pos
          y_pred_neg_numpy = y_pred_neg
  
      y_true = np.concatenate(
          [
              np.ones(len(y_pred_pos_numpy)),
              np.zeros(len(y_pred_neg_numpy)),
          ]
      ).astype(np.int32)
      y_pred = np.concatenate([y_pred_pos_numpy, y_pred_neg_numpy])
  
      rocauc = roc_auc_score(y_true, y_pred)
  
      return {"rocauc": rocauc}
  
file_path: ogb/ogb/linkproppred/evaluate.py
imports: import os
  import numpy
  import pandas
  from sklearn.metrics import roc_auc_score
label_desc: Use image node_id 8 for calling the Evaluator obj's underlying member method code with example usage: obj._eval_rocauc(y_pred_pos, y_pred_neg, type_info) and returns: dict