示例#1
0
 def test_getRMSE_3(self):
     squareRootsum = 40
     numElements = 5
     i = getRMSE(squareRootsum, numElements)
     self.assertEqual(i, 2.83)
示例#2
0
 def test_getRMSE_1(self):
     squareRootsum = 0.358302
     numElements = 7
     i = getRMSE(squareRootsum, numElements)
     self.assertEqual(i, 0.23)
示例#3
0
 def test_getRMSE_2(self):
     squareRootsum = 97
     numElements = 2
     i = getRMSE(squareRootsum, numElements)
     self.assertEqual(i, 6.96)
	def test_getRMSE_4(self):
		x = [2.0,5.0,17.0,12.8]
		y = [1.5,2.0,10.6,20.0]
		v = getRMSE(x, y)
		self.assertEqual(v, '5.05')
	def test_getRMSE_5(self):
		x = [7,7,10.0,2,7.0]
		y = [2,1,17.9,3,3.6]
		v = getRMSE(x, y)
		self.assertEqual(v, '5.21')
	def test_getRMSE_2(self):
		x = [20,6,14,4]
		y = [10,1,8,2]
		v = getRMSE(x, y)
		self.assertEqual(v, '6.42')
	def test_getRMSE_3(self):
		x = [32,6,10,235,26,6]
		y = [20,1,4,1,22,3]
		v = getRMSE(x, y)
		self.assertEqual(v, '95.73')
	def test_getRMSE_1(self):
		x = [1,2]
		y = [5,6]
		v = getRMSE(x, y)
		self.assertEqual(v, '4.00')
示例#9
0
 def test4_getRMSE(self):
     list1 = [3, 1.3, 2.7, 2.8, 9.2, 0.3, 1.2, 10.4]
     list2 = [3.4, 1.9, 3, 3, 12.5, 0, 2, 11]
     self.assertEqual('%.7f' % getRMSE(list1, list2), '1.2564832')
示例#10
0
 def test3_getRMSE(self):
     list1 = [100, 200, 5.4, 2.8, 9.2, 20.6]
     list2 = [104, 200.3, 5.0, 3.5, 8.4, 14.5]
     self.assertEqual('%.7f' % getRMSE(list1, list2), '3.0163444')
示例#11
0
 def test2_getRMSE(self):
     list1 = [2, 3, 4, 5 , 6, 7, 8, 9, 10]
     list2 = [1, 4, 3, 6, 5, 6, 7, 10, 11]
     self.assertEqual(getRMSE(list1, list2), 1)
示例#12
0
 def test1_getRMSE(self):
     list1 = [2, 3, 4, 5, 6]
     list2 = [2, 3, 4, 5, 6]
     self.assertEqual(getRMSE(list1, list2), 0.0)