Пример #1
0
 def test_miss_rate_top_k_many_batches_and_modes(self):
     value = metrics.miss_rate_top_k(self.x_many_batches_and_modes,
                                     self.y_many_batches_and_modes,
                                     self.p_many_batches_and_modes, 10)
     np.testing.assert_equal(
         value,
         np.array([[True, False, False], [True, True, False],
                   [False, False, False], [False, False, False],
                   [True, True, False]]))
Пример #2
0
 def test_miss_rate_top_k_one_mode(self):
     value = metrics.miss_rate_top_k(self.x_one_mode, self.y_one_mode,
                                     self.p_one_mode, 2)
     np.testing.assert_equal(value, np.array([[True]]))