Thursday, 15 August 2013

python error using PaCal statistical package -



python error using PaCal statistical package -

i started exploring python , have encountred problem bundle named pacal

everything looks working fine except maintain having error anytime want print out info (like in print a.mean() ) error line :

traceback (most recent phone call last): file "c:\users\rmobenta\desktop\tt.py", line 12, in <module> print a.interval(0.95) file "c:\python27\lib\site-packages\pacal\distr.py", line 229, in interval homecoming self.quantile(p_lim), self.quantile(1.0 - p_lim) file "c:\python27\lib\site-packages\pacal\distr.py", line 215, in quantile homecoming self.get_piecewise_cdf().inverse(y) file "c:\python27\lib\site-packages\pacal\segments.py", line 1721, in inverse x = findinv(segi.f, = segi.a, b = segi.b, c = y, rtol = params.segments.cumint.reltol, maxiter = params.segments.cumint.maxiter) # todo pind, minf file "c:\python27\lib\site-packages\pacal\utils.py", line 384, in findinv homecoming brentq(lambda x : fun(x) - c, a, b, **kwargs) file "c:\python27\lib\site-packages\scipy\optimize\zeros.py", line 414, in brentq raise valueerror("rtol little (%g < %g)" % (rtol, _rtol)) valueerror: rtol little (1e-16 < 4.44089e-16)

i using two-line script got demo (given author of package) , have no thought how tackle issue.

here script:

from pacal import * y = uniformdistr(1, 2) x = uniformdistr(3, 4) = atan(y / x) a.plot() print a.mean() print a.interval(0.95)

the problem comes pacal defines in l.141 of params.py: segments.vumint.reltol = 1e-16.

this value passed rtol in segments.py scipy function brentq().

finally compared numpy.finfo(float).eps * 2 (l.413 , l.10 of scipy/optimize/zeros.py) , unfortunately lesser.

so problem of pacal implementation, not related code.

note value provided interval() corresponds default value (l.222 of distr.py).

i think should contact pacal developers more informations , open issue.

python python-2.7 mathematical-packages

No comments:

Post a Comment