Esempio n. 1
0
 def test_rmse_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.rmse(points, knees, expected, evaluation.Strategy.worst)
     desired = math.sqrt(1/3)
     self.assertAlmostEqual(result, desired)
Esempio n. 2
0
 def test_rmse_2(self):
     points = np.array([[0,0], [1,1], [2,2]])
     knees = np.array([1])
     expected = np.array([[1,1], [2,2]])
     result = evaluation.rmse(points, knees, expected)
     desired = math.sqrt(1/2)
     self.assertAlmostEqual(result, desired)
Esempio n. 3
0
 def test_rmse_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.rmse(points, knees, expected)
     desired = 0.0
     self.assertAlmostEqual(result, desired)