def test_linlog(self): ylinlog = viz._estimate_from_fit(self.x, self.slope, self.intercept, xlog=False, ylog=True) percent_diff = numpy.abs(ylinlog - self.known_ylinlog) / self.known_ylinlog nptest.assert_array_almost_equal( percent_diff, numpy.zeros(self.x.shape[0]), decimal=5 )
def test_linlog(self): ylinlog = viz._estimate_from_fit(self.x, self.slope, self.intercept, xlog=False, ylog=True) percent_diff = np.abs(ylinlog - self.known_ylinlog) / self.known_ylinlog nptest.assert_array_almost_equal( percent_diff, np.zeros(self.x.shape[0]), decimal=5 )
def test_loglog(self): yloglog = viz._estimate_from_fit(self.x, self.slope, self.intercept, xlog=True, ylog=True) nptest.assert_array_almost_equal(yloglog, self.known_yloglog)
def test_linlin(self): ylinlin = viz._estimate_from_fit(self.x, self.slope, self.intercept, xlog=False, ylog=False) nptest.assert_array_almost_equal(ylinlin, self.known_ylinlin)