def test_rrmse_02(self): np.random.seed(42) predictions = np.random.uniform(-1, 1, 10).reshape(5, 2) targets = np.random.uniform(-1, 1, 10).reshape(5, 2) true = 0.9089760363050161 np.testing.assert_array_equal(rrmse(predictions, targets), true)
def test_rrmse_03(self): np.random.seed(42) predictions = np.random.uniform(-1, 1, 10).reshape(5, 2) targets = np.random.uniform(-1, 1, 10).reshape(2, 5) with self.assertRaises(ValueError): rrmse(predictions, targets)
def test_rrmse_01(self): np.random.seed(42) predictions = np.random.uniform(-1, 1, 5).reshape(5) targets = np.random.uniform(-1, 1, 5).reshape(5) true = 1.5298111757191089 np.testing.assert_array_equal(rrmse(predictions, targets), true)