Esempio n. 1
0
 def test_bad_split_index(self):
     tn = TreeNode([[1.0, 2.0], [1.0, 2.0]], [1.0, 2.0])
     with self.assertRaises(ValueError):
         tn.find_best_split(2)
     with self.assertRaises(ValueError):
         tn.find_best_split(-1)