예제 #1
0
 def test_MP_string(self):
     np.random.seed(100)
     d = discrete.maxProb(["A", "B", "C"])
     result = d([0.2, 0.3, 0.5], trial_responses=["A", "B"])
     correct_result = ('B', collections.OrderedDict([('A', 0.2), ('B', 0.3), ('C', 0.5)]))
     assert result == correct_result
예제 #2
0
 def test_MP_err_2(self):
     np.random.seed(100)
     d = discrete.maxProb(task_responses=[1, 2, 3])
     result = d([0.6, 0.3, 0.5], trial_responses=[1, 1])
     correct_result = (1, collections.OrderedDict([(1, 0.6), (2, 0.3), (3, 0.5)]))
     assert result == correct_result
예제 #3
0
 def test_MP_normal_2(self):
     np.random.seed(101)
     d = discrete.maxProb(task_responses=[1, 2, 3])
     result = d([0.5, 0.3, 0.5])
     correct_result = (3, collections.OrderedDict([(1, 0.5), (2, 0.3), (3, 0.5)]))
     assert result == correct_result