Skip to content

Commit 40937a7

Browse files
authored
Update docstring of SkewNormal, Triangular, Gumbel, Logistic, LogitNormal (#5596)
* fixed doctring of SkewNormal * fixed doctring of Triangular * fixed doctring of pymc.Gumbel * fixed doctring of pymc.Logistic * fixed doctring of pymc.LogitNormal * fixed optional parameters
1 parent c20cda2 commit 40937a7

File tree

1 file changed

+34
-25
lines changed

1 file changed

+34
-25
lines changed

pymc/distributions/continuous.py

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3033,14 +3033,15 @@ class SkewNormal(Continuous):
30333033
r"""
30343034
Univariate skew-normal log-likelihood.
30353035
3036-
The pdf of this distribution is
3036+
The pdf of this distribution is
30373037
30383038
.. math::
30393039
30403040
f(x \mid \mu, \tau, \alpha) =
30413041
2 \Phi((x-\mu)\sqrt{\tau}\alpha) \phi(x,\mu,\tau)
30423042
30433043
.. plot::
3044+
:context: close-figs
30443045
30453046
import matplotlib.pyplot as plt
30463047
import numpy as np
@@ -3071,13 +3072,15 @@ class SkewNormal(Continuous):
30713072
30723073
Parameters
30733074
----------
3074-
mu: float
3075+
mu : tensor_like of float, default 0
30753076
Location parameter.
3076-
sigma: float
3077+
sigma : tensor_like of float, optional
30773078
Scale parameter (sigma > 0).
3078-
tau: float
3079+
Defaults to 1.
3080+
tau : tensor_like of float, optional
30793081
Alternative scale parameter (tau > 0).
3080-
alpha: float
3082+
Defaults to 1.
3083+
alpha : tensor_like of float, default 1
30813084
Skewness parameter.
30823085
30833086
Notes
@@ -3114,9 +3117,9 @@ def logp(value, mu, sigma, alpha):
31143117
31153118
Parameters
31163119
----------
3117-
value: numeric
3120+
value : tensor_like of float
31183121
Value(s) for which log-probability is calculated. If the log probabilities for multiple
3119-
values are desired the values must be provided in a numpy array or Aesara tensor
3122+
values are desired the values must be provided in a numpy array or Aesara tensor.
31203123
31213124
Returns
31223125
-------
@@ -3134,7 +3137,7 @@ def logp(value, mu, sigma, alpha):
31343137

31353138
class Triangular(BoundedContinuous):
31363139
r"""
3137-
Continuous Triangular log-likelihood
3140+
Continuous Triangular log-likelihood.
31383141
31393142
The pdf of this distribution is
31403143
@@ -3149,6 +3152,7 @@ class Triangular(BoundedContinuous):
31493152
\end{cases}
31503153
31513154
.. plot::
3155+
:context: close-figs
31523156
31533157
import matplotlib.pyplot as plt
31543158
import numpy as np
@@ -3179,11 +3183,11 @@ class Triangular(BoundedContinuous):
31793183
31803184
Parameters
31813185
----------
3182-
lower: float
3186+
lower : tensor_like of float, default 0
31833187
Lower limit.
3184-
c: float
3185-
mode
3186-
upper: float
3188+
c : tensor_like of float, default 0.5
3189+
Mode.
3190+
upper : tensor_like of float, default 1
31873191
Upper limit.
31883192
"""
31893193

@@ -3211,7 +3215,7 @@ def logcdf(value, lower, c, upper):
32113215
32123216
Parameters
32133217
----------
3214-
value: numeric or np.ndarray or aesara.tensor
3218+
value : tensor_like of float
32153219
Value(s) for which log CDF is calculated. If the log CDF for multiple
32163220
values are desired the values must be provided in a numpy array or Aesara tensor.
32173221
@@ -3243,7 +3247,7 @@ def logcdf(value, lower, c, upper):
32433247

32443248
class Gumbel(Continuous):
32453249
r"""
3246-
Univariate Gumbel log-likelihood
3250+
Univariate Gumbel log-likelihood.
32473251
32483252
The pdf of this distribution is
32493253
@@ -3258,6 +3262,7 @@ class Gumbel(Continuous):
32583262
z = \frac{x - \mu}{\beta}.
32593263
32603264
.. plot::
3265+
:context: close-figs
32613266
32623267
import matplotlib.pyplot as plt
32633268
import numpy as np
@@ -3284,9 +3289,9 @@ class Gumbel(Continuous):
32843289
32853290
Parameters
32863291
----------
3287-
mu: float
3292+
mu : tensor_like of float
32883293
Location parameter.
3289-
beta: float
3294+
beta : tensor_like of float
32903295
Scale parameter (beta > 0).
32913296
"""
32923297
rv_op = gumbel
@@ -3324,7 +3329,7 @@ def logcdf(
33243329
33253330
Parameters
33263331
----------
3327-
value: numeric or np.ndarray or aesara.tensor
3332+
value : tensor_like of float
33283333
Value(s) for which log CDF is calculated. If the log CDF for multiple
33293334
values are desired the values must be provided in a numpy array or Aesara tensor.
33303335
@@ -3492,6 +3497,7 @@ class Logistic(Continuous):
34923497
\frac{\exp\left(-\frac{x - \mu}{s}\right)}{s \left(1 + \exp\left(-\frac{x - \mu}{s}\right)\right)^2}
34933498
34943499
.. plot::
3500+
:context: close-figs
34953501
34963502
import matplotlib.pyplot as plt
34973503
import numpy as np
@@ -3518,9 +3524,9 @@ class Logistic(Continuous):
35183524
35193525
Parameters
35203526
----------
3521-
mu: float
3527+
mu : tensor_like of float, default 0
35223528
Mean.
3523-
s: float
3529+
s : tensor_like of float, default 1
35243530
Scale (s > 0).
35253531
"""
35263532

@@ -3545,7 +3551,7 @@ def logcdf(value, mu, s):
35453551
35463552
Parameters
35473553
----------
3548-
value: numeric or np.ndarray or aesara.tensor
3554+
value : tensor_like of float
35493555
Value(s) for which log CDF is calculated. If the log CDF for multiple
35503556
values are desired the values must be provided in a numpy array or Aesara tensor.
35513557
@@ -3590,6 +3596,7 @@ class LogitNormal(UnitContinuous):
35903596
35913597
35923598
.. plot::
3599+
:context: close-figs
35933600
35943601
import matplotlib.pyplot as plt
35953602
import numpy as np
@@ -3614,12 +3621,14 @@ class LogitNormal(UnitContinuous):
36143621
36153622
Parameters
36163623
----------
3617-
mu: float
3624+
mu : tensor_like of float, default 0
36183625
Location parameter.
3619-
sigma: float
3626+
sigma : tensor_like of float, optional
36203627
Scale parameter (sigma > 0).
3621-
tau: float
3628+
Defaults to 1.
3629+
tau : tensor_like of float, optional
36223630
Scale parameter (tau > 0).
3631+
Defaults to 1.
36233632
"""
36243633
rv_op = logit_normal
36253634

@@ -3646,9 +3655,9 @@ def logp(value, mu, sigma):
36463655
36473656
Parameters
36483657
----------
3649-
value: numeric
3658+
value : tensor_like of float
36503659
Value(s) for which log-probability is calculated. If the log probabilities for multiple
3651-
values are desired the values must be provided in a numpy array or Aesara tensor
3660+
values are desired the values must be provided in a numpy array or Aesara tensor.
36523661
36533662
Returns
36543663
-------

0 commit comments

Comments
 (0)