def test_mapping_argmin_first(self): m = self.ensemble.approximate() m.outputs[0].lower = 0 m.outputs[0].upper = 0.9 m.outputs[1].lower = 1 m.outputs[1].upper = 1 m.outputs[2].lower = 2 m.outputs[2].upper = 2 self.assertEqual(0, vote.mapping_argmin(m))
def test_mapping_argmin_last(self): m = self.ensemble.approximate() m.outputs[0].lower = 3 m.outputs[0].upper = 3 m.outputs[1].lower = 2 m.outputs[1].upper = 2 m.outputs[2].lower = 1 m.outputs[2].upper = 1 self.assertEqual(2, vote.mapping_argmin(m))
def test_mapping_argmin_unknown(self): m = self.ensemble.approximate() self.assertEqual(-1, vote.mapping_argmin(m))