class_docstr: A class to test the TED_Cartesian explainer
class_docstr_tok: ["A","class","to","test","the","TED_Cartesian","explainer"]
docstr: Test 2 instances from the test dataset (hard-coded here) to ensure they give the correct Y and E value.
  Test all 3 interfaces to TED_Cartesian:  predict_explain, predict, and explain
docstr_tok: ["Test","2","instances","from","the","test","dataset","(","hard-coded","here",")","to","ensure","they","give","the","correct","Y","and","E","value",".","Test","all","3","interfaces","to","TED_Cartesian",":","predict_explain",",","predict",",","and","explain"]
code: def test_instances(self):
      """
      Test 2 instances from the test dataset (hard-coded here) to ensure they give the correct Y and E value.
      Test all 3 interfaces to TED_Cartesian:  predict_explain, predict, and explain
      """
  
      X1 = [[1, 2, -11, -3, -2, -2, 22, 22]]
      # correct answers:  Y:0; E:3
      Y, E = self.ted.predict_explain(X1)
      self.assertEqual(Y, -10)
      self.assertEqual(E, 13)
  
      Y = self.ted.predict(X1)
      self.assertEqual(Y, -10)
  
      E = self.ted.explain(X1)
      self.assertEqual(E, 13)
  
      X2 = [[3, 1, -11, -2, -2, -2, 296, 0]]
      ## correct answers: Y:-11, E:25
      Y, E = self.ted.predict_explain(X2)
      self.assertEqual(Y, -11)
      self.assertEqual(E, 25)
  
      Y = self.ted.predict(X2)
      self.assertEqual(Y, -11)
  
      E = self.ted.explain(X2)
      self.assertEqual(E, 25)
  
file_path: AIX360/tests/ted/test_TED_Cartesian.py
imports: import unittest
  import os
  import pandas
  from sklearn import svm
  from sklearn.model_selection import train_test_split
  from aix360.algorithms.ted import TED_CartesianExplainer
  from aix360.datasets.ted_dataset import TEDDataset
label_desc: Use image node_id 2 for calling the TestTED_Cartesian obj's underlying member method code with example usage: obj.test_instances() without return types