Skip to content

Commit 367129d

Browse files
committed
updated docs and examples
1 parent 030d863 commit 367129d

4 files changed

Lines changed: 120 additions & 5 deletions

File tree

APPLPyBugs.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ Current APPLPy Bugs:
77
the Bayes module (*** this is not a problem in credible set,
88
it's an issue with convergence conditions in the variate
99
generation algorithm)
10-
10+
4. Problem in Queue when the initial number of customers in the
11+
system is equal to the number of servers. Problems
12+
looks like it could be related to mpmath
1113

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
v0.4.4,
1+
v0.4.4, 20 August 2016
22
New Capabilities:
33
1. PlotLimits implemented to change the limits of a plot
44

docs/examples.py

Lines changed: 114 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,117 @@
9696
Xstar = BootstrapRV(X.variate(n=100))
9797
PlotDist(CDF(X))
9898
PlotDist(CDF(Xstar))
99-
plt.title('Comparison of Exponential CDF and Bootstrapped EDF')
99+
plt.title('Comparison of Exponential CDF and Bootstrapped EDF')
100+
101+
# Queue
102+
X=ExponentialRV(Rational(1,3))
103+
Y=ExponentialRV(Rational(1,2))
104+
Q=Queue(X,Y,n=3,k=2,s=3)
105+
Q.display()
106+
107+
# RV Algebra
108+
X=ExponentialRV(Rational(1,2))
109+
Y=ExponentialRV(Rational(1,3))
110+
111+
Z=X+Y
112+
Z.display()
113+
114+
Z = X - 4
115+
Z.display()
116+
117+
Z = -Y
118+
Z.display()
119+
120+
U=UniformRV(Rational(1),Rational(3))
121+
U2=UniformRV(Rational(4),Rational(5))
122+
Z=U*U2
123+
Z.display()
124+
125+
Z = U/4
126+
Z.display()
127+
128+
Z = U**3
129+
Z.display()
130+
131+
U=UniformRV(Rational(1),Rational(2))
132+
U2=UniformRV(Rational(3),Rational(4))
133+
Z=Convolution(U,U2)
134+
Z.display()
135+
136+
Z = ConvolutionIID(U,3)
137+
Z.display()
138+
139+
X=UniformRV(Rational(2),Rational(4))
140+
Y=UniformRV(Rational(3),Rational(5))
141+
Z=Product(X,Y)
142+
Z.display()
143+
144+
Z=ProductIID(X,3)
145+
Z.display()
146+
147+
# Random Variable Methods
148+
149+
X=TriangularRV(2,4,7)
150+
X.verifyPDF()
151+
Y=RV([x**2],[0,10],['continuous','pdf'])
152+
Y.verifyPDF()
153+
154+
X=BinomialRV(5,0.25)
155+
X.display()
156+
Convert(X)
157+
158+
T=TriangularRV(1,4,6)
159+
T.display()
160+
T.latex()
161+
162+
U=UniformRV(Rational(1),Rational(2))
163+
Z = ConvolutionIID(U,3)
164+
Z.display()
165+
Z.simplify()
166+
167+
# Saving Random Variables
168+
X = ExponentialRV(Rational(1,3))
169+
Y = ExponentialRV(Rational(1,4))
170+
Z = X+Y
171+
Z.save('conv.rv')
172+
173+
X = LoadRV('conv.rv')
174+
X.display()
175+
176+
# Statistics
177+
178+
X=NormalRV(2,2)
179+
data=X.variate(n=30)
180+
KSTest(X,data)
181+
182+
mu=Symbol('mu')
183+
sigma=Symbol('sigma',positive=True)
184+
X=NormalRV(mu,sigma)
185+
data=NormalRV(0,2).variate(n=40)
186+
MLE(X,data,[mu,sigma])
187+
188+
theta=Symbol('theta',positive=True)
189+
kappa=Symbol('kappa',positive=True)
190+
W=WeibullRV(theta,kappa)
191+
data=WeibullRV(2,4).variate(n=40)
192+
MOM(W,data,[theta,kappa],guess=[2.2,3.8],numeric=True)
193+
194+
# Transform
195+
196+
X=TriangularRV(Rational(2),Rational(4),Rational(5))
197+
gX=[[x**2,x**2],[-oo,0,oo]]
198+
Y=Transform(X,gX)
199+
Y.display()
200+
201+
# Truncation
202+
203+
X=BetaRV(2,2)
204+
Y=Truncate(X,[Rational(1,4),Rational(3,4)])
205+
Y.display()
206+
207+
# Variate Generation
208+
209+
X=TriangularRV(2,4,10)
210+
X.variate(n=5)
211+
X.variate(n=5,method='inverse')
212+
X.variate(s=.5,method='inverse')

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from distutils.core import setup
2-
2+
# To upload to PyPi run python setup.py sdist upload -r pypi
33
setup(
44
name='APPLPy',
5-
version='0.4.3',
5+
version='0.4.4',
66
author='Matthew Robinson',
77
author_email='mthw.wm.robinson@gmail.com',
88
packages=['applpy','applpy.test'],

0 commit comments

Comments
 (0)