Skip to content

Commit 4cb1f84

Browse files
authored
More tau/sd parameterization fixes.
1 parent a773039 commit 4cb1f84

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

pymc3/distributions/continuous.py

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,17 @@ class HalfNormal(PositiveContinuous):
355355
Parameters
356356
----------
357357
sd : float
358-
Standard deviation (sd > 0).
358+
Standard deviation (sd > 0) .(only required if tau is not specified)
359359
tau : float
360-
Precision (tau > 0).
360+
Precision (tau > 0). (only required if sd is not specified)
361+
362+
Examples
363+
--------
364+
with pm.Model():
365+
x = pm.HalfNormal('x', sd=10)
366+
367+
with pm.Model():
368+
x = pm.HalfNormal('x', tau=1/15)
361369
"""
362370

363371
def __init__(self, sd=None, tau=None, *args, **kwargs):
@@ -948,8 +956,18 @@ class StudentT(Continuous):
948956
Degrees of freedom, also known as normality parameter (nu > 0).
949957
mu : float
950958
Location parameter.
959+
sd : float
960+
Standard deviation (sd > 0) (only required if lam is not specified)
951961
lam : float
952-
Scale parameter (lam > 0).
962+
Precision (lam > 0) (only required if sd is not specified)
963+
964+
Examples
965+
--------
966+
with pm.Model():
967+
x = pm.StudentT('x', nu=15, mu=0, sd=10)
968+
969+
with pm.Model():
970+
x = pm.StudentT('x', nu=15, mu=0, sd=1/23)
953971
"""
954972

955973
def __init__(self, nu, mu=0, lam=None, sd=None, *args, **kwargs):

0 commit comments

Comments
 (0)