예제 #1
0
    def test_f_measure(self):
        y = TEST_DATA['fm']['y']
        y_pred = TEST_DATA['fm']['y_pred']
        f_expected = TEST_DATA['fm']['f']

        f = f_measure(y, y_pred)

        self.assertEqual(np.size(f), 1)
        self.assertAlmostEqual(f, f_expected)
예제 #2
0
 def test_f_measure(self):
     y = TEST_DATA['fm']['y']
     y_pred = TEST_DATA['fm']['y_pred']
     f = TEST_DATA['fm']['f']
     f_computed = f_measure(y, y_pred)
     self.assertAlmostEqual(f, f_computed, 6)