Skip to content

Commit 4f1a6df

Browse files
committed
Address review feedback: add log_cdf equation and use \frac
- Add equation for Normal.log_cdf with note about jax.scipy.stats.norm.logcdf implementation - Replace \tfrac with \frac in Cauchy.icdf equation Addresses review comments from @Qazalbash in PR #2188
1 parent ddd5f12 commit 4f1a6df

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

numpyro/distributions/continuous.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ def icdf(self, q: ArrayLike) -> ArrayLike:
439439
440440
.. math::
441441
F^{-1}(q; x_0, \gamma) = x_0 + \gamma \tan\!\left[\pi\!\left(q
442-
- \tfrac{1}{2}\right)\right]
442+
- \frac{1}{2}\right)\right]
443443
444444
:param q: Probability value in :math:`[0,1]`.
445445
:type q: ArrayLike
@@ -2736,6 +2736,12 @@ def cdf(self, value: ArrayLike) -> ArrayLike:
27362736
def log_cdf(self, value: ArrayLike) -> ArrayLike:
27372737
r"""Log of the cumulative distribution function.
27382738
2739+
.. math::
2740+
\log F(x; \mu, \sigma) = \log\!\left(\frac{1}{2}\left[1 + \mathrm{erf}\!\left(
2741+
\frac{x - \mu}{\sigma\sqrt{2}}\right)\right]\right)
2742+
2743+
Implementation uses :func:`jax.scipy.stats.norm.logcdf`.
2744+
27392745
:param value: Value to evaluate.
27402746
:type value: ArrayLike
27412747
"""

0 commit comments

Comments
 (0)