code: def __init__(self, y_true, y_pred, cutoff):
      assert len(y_true) == len(y_pred)
      assert 0 < cutoff < 1
  
      self.cutoff = cutoff
      self.tp = ((y_true == 1) * (y_pred >= self.cutoff)).sum()
      self.fp = ((y_true == 0) * (y_pred >= self.cutoff)).sum()
      self.tn = ((y_true == 0) * (y_pred < self.cutoff)).sum()
      self.fn = ((y_true == 1) * (y_pred < self.cutoff)).sum()
  
imports: from copy import deepcopy
  import numpy
  import pandas
  from .None import checks
  from ...None import _global_checks
  from ..._explainer import helper
  from ...model_explanations._model_performance import utils
label_desc: Use image node_id 1 to create a new ConfusionMatrix object  with example: obj = ConfusionMatrix(y_true, y_pred, cutoff)