예제 #1
0
 def testLsreg3(self):
     x = [1, 2, 3]
     y = [1, 2, 3]
     a, b = linreg.lsreg(x, y)
     self.assertEqual(round(a, 2), 1.0)
     self.assertEqual(round(b, 2), 0)
 def testLsreg3(self):
     x = [1, 2, 3]
     y = [1, 2, 3]
     a, b = linreg.lsreg(x, y)
     self.assertEqual(round(a, 2), 1.0)
     self.assertEqual(round(b, 2), 0)
예제 #3
0
 def testLsreg2(self):
     x = [0, 1, 2]
     y = [4, 5, 6]
     a, b = linreg.lsreg(x, y)
     self.assertEqual(round(a, 2), 1.0)
     self.assertEqual(round(b, 2), 4.0)
 def testLsreg2(self):
     x = [0, 1, 2]
     y = [4, 5, 6]
     a, b = linreg.lsreg(x, y)
     self.assertEqual(round(a, 2), 1.0)
     self.assertEqual(round(b, 2), 4.0)