Added the doctest again

master
Per.Andreas.Brodtkorb 14 years ago
parent db8e835b51
commit 0177714a8d

@ -1007,30 +1007,30 @@ class FitDistribution(rv_frozen):
def main(): def main():
import wafo.stats as ws # import wafo.stats as ws
R = ws.weibull_min.rvs(1,size=100); # R = ws.weibull_min.rvs(1,size=100);
phat = FitDistribution(ws.weibull_min, R, 1, scale=1, floc=0.0) # phat = FitDistribution(ws.weibull_min, R, 1, scale=1, floc=0.0)
#
# Better CI for phat.par[i=0] # # Better CI for phat.par[i=0]
Lp1 = Profile(phat, i=0) # Lp1 = Profile(phat, i=0)
Lp2 = Profile(phat, i=2) # Lp2 = Profile(phat, i=2)
SF = 1./990 # SF = 1./990
x = phat.isf(SF) # x = phat.isf(SF)
#
# CI for x # # CI for x
Lx = Profile(phat, i=0,x=x,link=phat.dist.link) # Lx = Profile(phat, i=0,x=x,link=phat.dist.link)
Lx.plot() # Lx.plot()
x_ci = Lx.get_bounds(alpha=0.2) # x_ci = Lx.get_bounds(alpha=0.2)
#
# CI for logSF=log(SF) # # CI for logSF=log(SF)
Lsf = phat.profile(i=0, logSF=log(SF), link=phat.dist.link) # Lsf = phat.profile(i=0, logSF=log(SF), link=phat.dist.link)
Lsf.plot() # Lsf.plot()
sf_ci = Lsf.get_bounds(alpha=0.2) # sf_ci = Lsf.get_bounds(alpha=0.2)
pass # pass
#import doctest import doctest
#doctest.testmod() doctest.testmod()
# _WAFODIST = ppimport('wafo.stats.distributions') # _WAFODIST = ppimport('wafo.stats.distributions')

Loading…
Cancel
Save