Пример #1
0
 def test_4pt(self):
     input_ = [(0, 1), (0, 2), (2, 1), (2, 2)]
     expected = [(0, 1.5), (1, 1.5)]
     actual = LinearRegression.fit_2d(input_)
     self.assertEqual(expected, actual)
Пример #2
0
 def test_2pt(self):
     input_ = [(0, 1), (1, 0)]
     expected = input_
     actual = LinearRegression.fit_2d(input_)
     self.assertEqual(expected, actual)