Skip to content

Commit a773039

Browse files
authored
Added LogNormal + HalfStudentT docfix.
1 parent 90fc7da commit a773039

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

pymc3/distributions/continuous.py

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -845,8 +845,19 @@ class Lognormal(PositiveContinuous):
845845
----------
846846
mu : float
847847
Location parameter.
848+
sd : float
849+
Standard deviation. (sd > 0). (only required if tau is not specified).
848850
tau : float
849-
Scale parameter (tau > 0).
851+
Scale parameter (tau > 0). (only required if sd is not specified).
852+
853+
Example
854+
-------
855+
# Example to show that we pass in only `sd` or `tau` but not both.
856+
with pm.Model():
857+
x = pm.Lognormal('x', mu=2, sd=30)
858+
859+
with pm.Model():
860+
x = pm.Lognormal('x', mu=2, tau=1/100)
850861
"""
851862

852863
def __init__(self, mu=0, sd=None, tau=None, *args, **kwargs):
@@ -1596,9 +1607,19 @@ class HalfStudentT(PositiveContinuous):
15961607
Degrees of freedom, also known as normality parameter (nu > 0).
15971608
sd : float
15981609
Scale parameter (sd > 0). Converges to the standard deviation as nu
1599-
increases
1610+
increases. (only required if lam is not specified)
16001611
lam : float
1601-
Scale parameter (lam > 0). Converges to the precision as nu increases
1612+
Scale parameter (lam > 0). Converges to the precision as nu
1613+
increases. (only required if sd is not specified)
1614+
1615+
Examples
1616+
--------
1617+
# Only pass in one of lam or sd, but not both.
1618+
with pm.Model():
1619+
x = pm.HalfStudentT('x', sd=10, nu=10)
1620+
1621+
with pm.Model():
1622+
x = pm.HalfStudentT('x', lam=4, nu=10)
16021623
"""
16031624
def __init__(self, nu=1, sd=None, lam=None, *args, **kwargs):
16041625
super(HalfStudentT, self).__init__(*args, **kwargs)

0 commit comments

Comments
 (0)