class_docstr: TED is an explainability framework that leverages domain-relevant explanations in
  the training dataset to predict both labels and explanations for new instances [#]_.
  This is an implementation of the simplest instantiation of TED, called the Cartesian Product.
  
  References:
      .. [#] `Michael Hind, Dennis Wei, Murray Campbell, Noel C. F. Codella,
         Amit Dhurandhar, Aleksandra Mojsilovic, Karthikeyan Natesan Ramamurthy,
         Kush R. Varshney, "TED: Teaching AI to Explain its Decisions,"
         AAAI /ACM Conference on Artificial Intelligence, Ethics,
         and Society (AIES-19), 2019.
         <https://doi.org/10.1145/3306618.3314273>`_
class_docstr_tok: ["TED","is","an","explainability","framework","that","leverages","domain-relevant","explanations","in","the","training","dataset","to","predict","both","labels","and","explanations","for","new","instances","[","#","]","_",".","This","is","an","implementation","of","the","simplest","instantiation","of","TED",",","called","the","Cartesian","Product",".","References",":","..","[","#","]","`","Michael","Hind",",","Dennis","Wei",",","Murray","Campbell",",","Noel","C.","F.","Codella",",","Amit","Dhurandhar",",","Aleksandra","Mojsilovic",",","Karthikeyan","Natesan","Ramamurthy",",","Kush","R.","Varshney",",","``","TED",":","Teaching","AI","to","Explain","its","Decisions",",","''","AAAI","\/ACM","Conference","on","Artificial","Intelligence",",","Ethics",",","and","Society","(","AIES-19",")",",","2019",".","<","https",":","\/\/doi.org\/10.1145\/3306618.3314273",">","`","_"]
docstr: Create cartesian product of Y and E
  
  Args:
      Y : list of labels
      E : list of explanations
  Returns:
      list of labels : We map Y and E into new dense label space, where::
  
          Y = 0 ==> 0 .. NumE-1
          Y = 1 ==> NumE .. 2*NumE - 1
docstr_tok: ["Create","cartesian","product","of","Y","and","E","Args",":","Y",":","list","of","labels","E",":","list","of","explanations","Returns",":","list","of","labels",":","We","map","Y","and","E","into","new","dense","label","space",",","where",":",":","Y","=","0","==",">","0","..","NumE-1","Y","=","1","==",">","NumE","..","2","*","NumE","-","1"]
code: def _composeYE(self, Y, E):
      """Create cartesian product of Y and E
  
      Args:
          Y : list of labels
          E : list of explanations
      Returns:
          list of labels : We map Y and E into new dense label space, where::
  
              Y = 0 ==> 0 .. NumE-1
              Y = 1 ==> NumE .. 2*NumE - 1
      """
      return Y * self.NumE + E
  
file_path: AIX360/aix360/algorithms/ted/TED_Cartesian.py
imports: from aix360.algorithms.dise import DISExplainer
  from sklearn import metrics
label_desc: Use image node_id 8 for calling the TED_CartesianExplainer obj's underlying member method code with example usage: obj._composeYE(Y, E) and returns: unknown