Esempio n. 1
0
 def test_mae_0(self):
     points = np.array([[0,0], [1,1], [2,2]])
     knees = np.array([0,1,2])
     expected = np.array([[0,0], [1,1], [2,2]])
     result = evaluation.mae(points, knees, expected)
     desired = 0.0
     self.assertAlmostEqual(result, desired)
Esempio n. 2
0
 def test_mae_1(self):
     points = np.array([[0,0], [1,1], [2,2]])
     knees = np.array([0,1,2])
     expected = np.array([[1,1], [2,2]])
     result = evaluation.mae(points, knees, expected, evaluation.Strategy.worst)
     desired = 1/3
     self.assertAlmostEqual(result, desired)