def test_rmse_2(self): n1, n2 = [2, 3, 4], [1, 2, 3] r = rmse(n1, n2) self.assertEqual(r, 1)
def test_rmse_1(self): x = rmse({"1-30878": 4}, {'1': {'30878': 3.700992340036563}}, {'1': {0: '30878'}}) self.assertEqual(x, 0.2990076599634368)
def test_rmse2 (self) : a = [10, 15, 20] p = [15, 20, 25] rmse2 = rmse (a, p) self.assertEqual (rmse2, 5)
def test_rmse_1(self) : data = [1, 1] rms_error = rmse(data) self.assertEqual(rms_error, 1)
def test_rmse2 (self) : i = [1, 2, 3] j = [1, 1, 1] k = rmse(i, j) self.assertEqual(1.29, k)
def test_rmse_7(self): ans = rmse([1, 2, 3, 4], [5, 6, 7, 8]) self.assertEqual(ans, 4.0)
def test_rmse4 (self) : a = 1000000 * [1] b = 1000000 * [6] self.assertTrue(str(rmse(a,b)) == "5.0")
def test_rmse1(self): a = [1, 2, 3] p = [2, 3, 4] rmse1 = rmse(a, p) self.assertEqual(rmse1, 1)
def test_rmse2(self): a = [10, 15, 20] p = [15, 20, 25] rmse2 = rmse(a, p) self.assertEqual(rmse2, 5)
def test_rmse_8 (self) : v = rmse([3.5,2.5,4.75], [1,2,3]) self.assertEqual(v, 1.7853571071357126)
def test_rmse_9 (self) : v = rmse([3.5,2.5,4.75], [-1,0,3]) self.assertEqual(v, 3.139134700306227)
def test_rmse_5(self): n1, n2 = [-1.5], [1.5] r = rmse(n1, n2) self.assertEqual(r, 3)
def test_rmse_4(self): n1, n2 = [1, 1, 1], [-1, -1, -1] r = rmse(n1, n2) self.assertEqual(r, 2)
def test_rmse_3(self): n1, n2 = [1], [1] r = rmse(n1, n2) self.assertEqual(r, 0)
def test_rmse_1(self): ans = rmse([1, 2, 4, 5], [1, 2, 3, 4, 5, 6, 7]) self.assertEqual(ans, 0)
def test_rmse3(self): a = [10, 10, 10] p = [10, 10, 10] rmse3 = rmse(a, p) self.assertEqual(rmse3, 0)
def test_rmse_5(self): ans = rmse(None, None) self.assertEqual(ans, 0)
def test_rmse4(self): a = [11, 11, 11] p = [10, 10, 10] rmse4 = rmse(a, p) self.assertEqual(rmse4, 1)
def test_rmse2 (self) : a = [2,3,4] b = (3,4,5) self.assertTrue(str(rmse(a,b)) == "1.0") self.assertTrue(str(rmse(b,a)) == "1.0")
def test_rmse5(self): a = [23, 39, 69] p = [12, 14, 16] rmse5 = rmse(a, p) self.assertEqual(rmse5, 34.42382895611701)
def test_rmse_2 (self) : a = [5,4] p = [5,4] v = rmse(a,p) self.assertEqual (v, 0)
def test_rmse_1(self): """ test netflix rmse """ list1 = [1, 2, 3] list2 = [2, 3, 4] self.assertEqual(rmse(list1, list2), 1.00)
def test_rmse_3 (self) : data = [5, 2] rms_error = rmse(data) self.assertEqual(rms_error, math.sqrt(5/2))
def test_rmse_2(self): """ test netflix rmse """ list1 = [1, 2, 3] list2 = [3, 4, 5] self.assertEqual(rmse(list1, list2), 2.00)
def test_rmse4 (self) : i = [15, 1, -1] j = [15, 1, 1] k = rmse(i, j) self.assertEqual(1.15, k)
def test_rmse_3(self): """ test netflix rmse """ list1 = [4, 5, 1, 4, 5, 3, 2] list2 = [3.7, 4.2, 3, 4.2, 2.2, 3.8, 2] self.assertEqual(rmse(list1, list2), 1.38)
def test_rmse_3(self): x = rmse({"1-30878": 4, "10-1952305": 3, "10-1531863": 3}, {'1': {'2647871': 3.492592340036563, '1283744': 3.654102340036563, '30878': 3.700992340036563}, '10': {'1952305': 3.290585903614458, '1531863': 3.155125903614458}}, {'1': {0: '30878'}, '10': {0: '1952305', 1: '1531863'}}) self.assertEqual(x, 0.2568461238877235)
def test_rmse_4(self): """ test netflix rmse """ list1 = [1, 2, 3, 5, 5, 5, 1] list2 = [3, 4, 5, 3, 3, 3, 4] self.assertEqual(rmse(list1, list2), 2.17)
def test_rmse4 (self) : a = [11, 11, 11] p = [10, 10, 10] rmse4 = rmse (a, p) self.assertEqual (rmse4, 1)
def test_rmse_2(self): a = [3, 3, 5] p = [1, 1, 3] r = rmse(a,p) self.assertEqual(r, 2.00)
def test_rmse (self) : p = rmse(['1', '1'], ['1', '1']) self.assertEqual(p, 0)
def test_rmse_3(self): p = [1, 2, 3] a = [2, 3, 4] r = rmse(a,p) self.assertEqual(r, 1.00)
def test_rmse_4(self): ans = rmse([], []) self.assertEqual(ans, 0)
def test_rmse_4(self): a = [5, 5, 5] p = [1, 1, 1] r = rmse(a,p) self.assertEqual(r, 4.00)
def test_rmse_6(self): ans = rmse([1, 2, 3, 4], [1, 2, 3, 4]) self.assertEqual(ans, 0)
def test_rmse(self): a = [4,3,2] b = [1,2,5] r = rmse(a,b) self.assertEqual(r, math.sqrt(19/3))
def test_rmse1 (self) : a = (2,3,4) b = (2,3,4) self.assertTrue(str(rmse(a,b)) == "0.0")
def test_rmse(self): a = rmse([1, 1, 1], [2, 2, 2]) self.assertEqual(a, 1)
def test_rmse3 (self) : a = (1,4,5,8,9) b = (1,5,5,4,8) self.assertTrue(str(round(rmse(a,b), 6)) == "1.897367")
def test_rmse_2(self): a = rmse([1, 1, 1], [1, 1, 1]) self.assertEqual(a, 0)
def test_rmse_1 (self) : a = [1,2] p = [3,4] v = rmse(a,p) self.assertEqual (v, 2)
def test_rmse_3(self): a = rmse([1.5, 1.5, 1.5], [2, 2, 2]) self.assertEqual(a, .5)
def test_rmse_3 (self) : a = [4,5,4,5,1] p = [2,3,2,3,3] v = rmse(a,p) self.assertEqual (v, 2)
def test_rmse_2(self): expected = [1, 2, 3, 4] actual = [2, 3, 4, 5] result = rmse(expected, actual) self.assertEqual(result, 1)
def test_rmse_2(self) : data = [4, 2] rms_error = rmse(data) self.assertEqual(rms_error, math.sqrt(2))
def test_rmse_3(self): expected = [1, 2, 3] actual = [2, 3, 3] result = rmse(expected, actual) self.assertEqual(result, .82)
def test_rmse1 (self) : i = [1, 1, 1] j = [1, 1, 1] k = rmse(i, j) self.assertEqual(0, k)
def test_rmse_1(self): real_list = [['10:', 3, 3, 3, 4]] estimate_list = [['10:', 2, 2, 2, 3]] rmse_result = rmse(real_list, estimate_list) self.assertEqual(rmse_result, '1.00')
def test_rmse3 (self) : i = [-15, -100, 1000] j = [1, 1, 1] k = rmse(i, j) self.assertEqual(579.79, k)
def test_rsme_2(self): real_list = [['1:', 1, 1, 1, 1, 1], ['2:', 2, 2], ['3:', 3, 3, 3]] estimate_list = [['1:', 2, 1, 3, 2, 5], ['2:', 2, 2], ['3:', 3, 3, 2]] rmse_result = rmse(real_list, estimate_list) self.assertEqual(rmse_result, '1.52')
def test_rmse5 (self) : i = [12, 14, 16] j = [13, 15, 17] k = rmse(i, j) self.assertEqual(1, k)
def test_rsme_3(self): real_list = [['6:', 1, 1, 2, 5, 3], ['7:', 5, 1], ['601:', 3, 4, 3]] estimate_list = [['1:', 2, 1, 3, 2, 5], ['7:', 2, 2], ['601:', 3, 3, 2]] rmse_result = rmse(real_list, estimate_list) self.assertEqual(rmse_result, '1.64')
def test_rmse_2(self): x = rmse({"1-30878": 4, "1-2647871": 4, "1-1283744": 3}, {'1': {'2647871': 3.492592340036563, '1283744': 3.654102340036563, '30878': 3.700992340036563}}, {'1': {0: '30878', 1: '2647871', 2: '1283744'}}) self.assertEqual(x, 0.5081725380707123)
def test_rmse_1(self): actual = {1: {1: 3, 2: 4, 3: 3}} prediction = {1: {1: 3, 2: 4, 3: 3}} self.assertEqual(rmse(actual, prediction), '0.00')
def test_rmse1 (self) : a = [1, 2, 3] p = [2, 3, 4] rmse1 = rmse (a, p) self.assertEqual (rmse1, 1)
def test_rmse_2(self): actual = {1: {1: 2, 2: 3, 3: 4}} prediction = {1: {1: 4, 2: 1, 3: 7}} self.assertEqual(rmse(actual, prediction), "2.38")
def test_rmse3 (self) : a = [10, 10, 10] p = [10, 10, 10] rmse3 = rmse (a, p) self.assertEqual (rmse3, 0)
def test_rmse_3(self): actual = {1: {1: 2, 2: 3, 3: 4}} prediction = {1: {1: 3, 2: 2, 3: 5}} self.assertEqual(rmse(actual, prediction), "1.00")
def test_rmse5 (self) : a = [23, 39, 69] p = [12, 14, 16] rmse5 = rmse (a, p) self.assertEqual (rmse5, 34.42382895611701)
def test_rmse_0(self): n1, n2 = [1, 2, 3], [1, 2, 3] r = rmse(n1, n2) self.assertEqual(r, 0)