コード例 #1
0
ファイル: test_addist.py プロジェクト: saaketp/scikit-gof
    def test_cdf(self):
        # The high tolerance is more due to the imprecision of the test values.
        for sp, st, pr in lewis_values:
            assert isclose(ad_unif.cdf(st, sp), pr, rtol=.05)

        # Compared to R package "goftest" (based on the same approximation).
        ps = ad_unif(5).cdf((.5, 1, 2, 3))
        assert allclose(ps, (.2617, .6474, .9057, .9708), rtol=.5e-3)
        ps = ad_unif(10).cdf((.5, 1, 2, 3))
        assert allclose(ps, (.2574, .6449, .9069, .9717), rtol=.5e-3)
        ps = ad_unif(20).cdf((.5, 1, 2, 3))
        assert allclose(ps, (.2553, .6438, .9075, .9722), rtol=.5e-3)
コード例 #2
0
ファイル: test_addist.py プロジェクト: wrwrwr/scikit-gof
    def test_cdf(self):
        # The high tolerance is more due to the imprecision of the test values.
        for sp, st, pr in lewis_values:
            assert isclose(ad_unif.cdf(st, sp), pr, rtol=.05)

        # Compared to R package "goftest" (based on the same approximation).
        ps = ad_unif(5).cdf((.5, 1, 2, 3))
        assert allclose(ps, (.2617, .6474, .9057, .9708), rtol=.5e-3)
        ps = ad_unif(10).cdf((.5, 1, 2, 3))
        assert allclose(ps, (.2574, .6449, .9069, .9717), rtol=.5e-3)
        ps = ad_unif(20).cdf((.5, 1, 2, 3))
        assert allclose(ps, (.2553, .6438, .9075, .9722), rtol=.5e-3)
コード例 #3
0
ファイル: test_addist.py プロジェクト: saaketp/scikit-gof
 def test_one(self):
     # For n = 1, p = sqrt(1 - 4 exp(-1 - z)) or 0.
     ps = ad_unif(1).cdf((.1, 1, 3))
     assert allclose(ps, (0, .677243580297, .962672033688), rtol=.5e-12)
コード例 #4
0
ファイル: test_addist.py プロジェクト: wrwrwr/scikit-gof
 def test_one(self):
     # For n = 1, p = sqrt(1 - 4 exp(-1 - z)) or 0.
     ps = ad_unif(1).cdf((.1, 1, 3))
     assert allclose(ps, (0, .677243580297, .962672033688), rtol=.5e-12)