code: def get_preaggregated_confusion_matrix(y_pred, y_true, pos_value):
      y_p = y_pred.to_numpy()
      y_t = y_true.to_numpy() == pos_value
  
      tp = np.where(y_p & y_t)[0]
      tn = np.where(np.logical_not(y_p) & np.logical_not(y_t))[0]
      fp = np.where(y_p & np.logical_not(y_t))[0]
      fn = np.where(y_t & np.logical_not(y_p))[0]
  
      return tp, tn, fp, fn
  
file_path: AIX360/aix360/algorithms/rule_induction/trxf/metrics.py
imports: from collections import namedtuple
  from copy import deepcopy
  from typing import List
  import numpy
  import pandas
  from sklearn.metrics import confusion_matrix
  from aix360.algorithms.rule_induction.trxf.core.dnf_ruleset import DnfRuleSet
  from aix360.algorithms.rule_induction.trxf.core.utils import batch_evaluate
label_desc: Use image node_id 4 for calling a global function with example usage: get_preaggregated_confusion_matrix(y_pred, y_true, pos_value) and returns: tp,  tn,  fp,  fn