docstr: Creates the classification outcome data for binary
  classification scenario.
  
  :param true_y: The true labels.
  :type true_y: list or numpy.ndarray
  :param pred_y: The predicted labels.
  :type pred_y: list or numpy.ndarray
  :param classes: The classes.
  :type classes: list
  :return: The classification outcome data.
  :rtype: list
docstr_tok: ["Creates","the","classification","outcome","data","for","binary","classification","scenario",".",":","param","true_y",":","The","true","labels",".",":","type","true_y",":","list","or","numpy.ndarray",":","param","pred_y",":","The","predicted","labels",".",":","type","pred_y",":","list","or","numpy.ndarray",":","param","classes",":","The","classes",".",":","type","classes",":","list",":","return",":","The","classification","outcome","data",".",":","rtype",":","list"]
code: def _compute_binary_classification_outcome_data(
      self, true_y, pred_y, classes
  ):
      """Creates the classification outcome data for binary
      classification scenario.
  
      :param true_y: The true labels.
      :type true_y: list or numpy.ndarray
      :param pred_y: The predicted labels.
      :type pred_y: list or numpy.ndarray
      :param classes: The classes.
      :type classes: list
      :return: The classification outcome data.
      :rtype: list
      """
      classification_outcome = []
      if not isinstance(pred_y, np.ndarray):
          pred_y = np.array(pred_y)
  
      if not isinstance(true_y, np.ndarray):
          true_y = np.array(true_y)
  
      for i in range(len(true_y)):
          if true_y[i] == pred_y[i]:
              if true_y[i] == classes[0]:
                  # True positive == 0
                  classification_outcome.append(0)
              else:
                  # True negative == 3
                  classification_outcome.append(3)
          else:
              if true_y[i] == classes[0]:
                  # False negative == 2
                  classification_outcome.append(2)
              else:
                  # False positive == 1
                  classification_outcome.append(1)
      return classification_outcome
  
file_path: responsible-ai-toolbox/erroranalysis/erroranalysis/_internal/cohort_filter.py
imports: from typing import Any, List, Optional
  import numpy
  import pandas
  from erroranalysis._internal.constants import ARG, COLUMN, COMPOSITE_FILTERS, METHOD, OPERATION, PRED_Y, ROW_INDEX, TRUE_Y, CohortFilterMethods, CohortFilterOps, ModelTask
  from erroranalysis._internal.metrics import get_ordered_classes
  from erroranalysis._internal.utils import is_spark
label_desc: Use image node_id 5 for calling the FilterDataWithCohortFilters obj's underlying member method code with example usage: obj._compute_binary_classification_outcome_data(true_y, pred_y, classes) and returns: classification_outcome