コード例 #1
0
 def test_mapping_check_argmin_first(self):
     m = self.ensemble.approximate()
     m.outputs[0].lower = 0
     m.outputs[0].upper = 0
     m.outputs[1].lower = 1
     m.outputs[1].upper = 1
     m.outputs[2].lower = 1
     m.outputs[2].upper = 1
     self.assertTrue(vote.mapping_check_argmin(m, 0))
     self.assertFalse(vote.mapping_check_argmin(m, 1))
     self.assertFalse(vote.mapping_check_argmin(m, 2))
コード例 #2
0
 def test_mapping_check_argmin_unsure(self):
     m = self.ensemble.approximate()
     m.outputs[0].lower = 0
     m.outputs[0].upper = 1
     m.outputs[1].lower = 0
     m.outputs[1].upper = 1
     m.outputs[2].lower = 0
     m.outputs[2].upper = 0
     self.assertEqual(vote.UNSURE, vote.mapping_check_argmin(m, 0))
     self.assertEqual(vote.UNSURE, vote.mapping_check_argmin(m, 1))
     self.assertTrue(vote.mapping_check_argmin(m, 2))