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: Evaluate the accuracy (Y and E) of the TED-enhanced classifier using a test dataset
  
  Args:
      X_test (list of lists): list of feature vectors
      Y_test (list of int)  : list of labels {0, 1}
      E_test (list of ints) : list of explanations {0, ..., NumExplanations -1}
  Returns:
      tuple:
  
          * **YE_accuracy** -- the accuracy of predictions when the labels (Y) and explanations (E) are treated as a combined label
          * **Y_accuracy** -- the prediction accuracy for labels (Y)
          * **E_accuracy** -- the prediction accuracy of explanations (E)
docstr_tok: ["Evaluate","the","accuracy","(","Y","and","E",")","of","the","TED-enhanced","classifier","using","a","test","dataset","Args",":","X_test","(","list","of","lists",")",":","list","of","feature","vectors","Y_test","(","list","of","int",")",":","list","of","labels","{","0",",","1","}","E_test","(","list","of","ints",")",":","list","of","explanations","{","0",",","...",",","NumExplanations","-1","}","Returns",":","tuple",":","*","*","*","YE_accuracy","*","*","--","the","accuracy","of","predictions","when","the","labels","(","Y",")","and","explanations","(","E",")","are","treated","as","a","combined","label","*","*","*","Y_accuracy","*","*","--","the","prediction","accuracy","for","labels","(","Y",")","*","*","*","E_accuracy","*","*","--","the","prediction","accuracy","of","explanations","(","E",")"]
code: def score(self, X_test, Y_test, E_test):
      """Evaluate the accuracy (Y and E) of the TED-enhanced classifier using a test dataset
  
      Args:
          X_test (list of lists): list of feature vectors
          Y_test (list of int)  : list of labels {0, 1}
          E_test (list of ints) : list of explanations {0, ..., NumExplanations -1}
      Returns:
          tuple:
  
              * **YE_accuracy** -- the accuracy of predictions when the labels (Y) and explanations (E) are treated as a combined label
              * **Y_accuracy** -- the prediction accuracy for labels (Y)
              * **E_accuracy** -- the prediction accuracy of explanations (E)
      """
      YE_predict = self.clf.predict(X_test)
      YE_test = self._composeYE(Y_test, E_test)
      YE_accuracy = metrics.accuracy_score(YE_test, YE_predict)
  
      Y_predict, E_predict = self._decomposeYE(YE_predict)
      Y_accuracy = metrics.accuracy_score(Y_test, Y_predict)
      E_accuracy = metrics.accuracy_score(E_test, E_predict)
  
      return YE_accuracy, Y_accuracy, E_accuracy
  
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 7 for calling the TED_CartesianExplainer obj's underlying member method code with example usage: obj.score(X_test, Y_test, E_test) and returns: YE_accuracy,  Y_accuracy,  E_accuracy