Example #1
0
 def test__acquire_multiple(self):
     recommender = Recommender(self.dpp_matrix, self.n_components)
     predictions = np.array([1, 9, 9, 7])
     acquired = recommender._acquire(predictions)
     expected_1 = 2
     expected_2 = 1
     self.assertTrue(acquired == expected_1 or acquired == expected_2)
Example #2
0
 def test__acquire_last(self):
     recommender = Recommender(self.dpp_matrix, self.n_components)
     predictions = np.array([1, 3, 5, 7])
     acquired = recommender._acquire(predictions)
     expected = 3
     self.assertEqual(acquired, expected)