def setUp(self): xs, ys, wxs, wys = pearson() exs = wxs**-0.5 eys = wys**-0.5 self.reg.trait_set(xs=xs, ys=ys, xserr=exs, yserr=eys) self.reg.calculate() self.solution = {'n': len(xs)}
def setUp(self): xs, ys, wxs, wys = pearson() exs = wxs ** -0.5 eys = wys ** -0.5 self.reg.trait_set(xs=xs, ys=ys, xserr=exs, yserr=eys) self.reg.calculate() self.solution={'n':len(xs)}
def test_mswd(self): expected = pearson(self.kind) self.assertAlmostEqual(self.reg.mswd, expected['mswd'], 3)
def test_y_intercept(self): expected = pearson(self.kind) self.assertAlmostEqual(self.reg.intercept, expected['intercept'], 4)
def test_slope(self): exp = pearson(self.kind) self.assertAlmostEqual(self.reg.slope, exp['slope'], 4)