Beispiel #1
0
 def test_distribution_rvs(self):
     alpha = 0.01
     loc = 0
     scale = 1
     arg = (loc, scale)
     distfn = loguniform_gen(0, 1)
     D, pval = stats.kstest(distfn.rvs, distfn.cdf, args=arg, N=1000)
     if (pval < alpha):
         npt.assert_(pval > alpha,
                     "D = %f; pval = %f; alpha = %f; args=%s" % (
                         D, pval, alpha, arg))
Beispiel #2
0
 def test_distribution_rvs(self):
     alpha = 0.01
     loc = 0
     scale = 1
     arg = (loc, scale)
     distfn = loguniform_gen(0, 1)
     D, pval = stats.kstest(distfn.rvs, distfn.cdf, args=arg, N=1000)
     if pval < alpha:
         npt.assert_(
             pval > alpha,
             f"D = {D:f}; pval = {pval:f}; alpha = {alpha:f}; args={arg}",
         )
Beispiel #3
0
 def test_pdf(self):
     check_pdf(loguniform_gen(0, 1), (0, 1), '')
     check_pdf(loguniform_gen(low=-4, high=-2), (-3, 2), '')
Beispiel #4
0
 def test_pdf_logpdf(self):
     check_pdf_logpdf(loguniform_gen(0, 1), (0, 1), '')
     check_pdf_logpdf(loguniform_gen(low=-4, high=-0.5), (-2, 1), '')
Beispiel #5
0
 def test_cdf_ppf(self):
     check_cdf_ppf(loguniform_gen(0, 1), (0, 1), '')
     check_cdf_ppf(loguniform_gen(-2, 1), (-5, 5), '')
Beispiel #6
0
 def test_cdf_logcdf(self):
     check_cdf_logcdf(loguniform_gen(0, 1), (0, 1), "")
     check_cdf_logcdf(loguniform_gen(0, 1), (-5, 5), "")