code: def __new__(cls, y_true, y_pred, *args, **kwargs):
      uniq_true = np.unique(y_true)
      uniq_pred = np.unique(y_pred)
      if len(uniq_true) <= 2 and len(uniq_pred) <= 2:
          if len(set(uniq_true) - set(uniq_pred)) == 0:
              from pandas_ml.confusion_matrix.bcm import (
                  BinaryConfusionMatrix,
              )
  
              return BinaryConfusionMatrix(
                  y_true, y_pred, *args, **kwargs
              )
      return LabeledConfusionMatrix(y_true, y_pred, *args, **kwargs)
  
file_path: pandas-ml/pandas_ml/confusion_matrix/cm.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
  from pandas_ml.confusion_matrix.abstract import ConfusionMatrixAbstract
label_desc: Use image node_id 1 for calling the ConfusionMatrix obj's underlying member method code with example usage: obj.__new__(cls, y_true, y_pred) and returns: LabeledConfusionMatrix, BinaryConfusionMatrix