Skip to content

Commit 4fba621

Browse files
committed
✨added logit_p to docstring & noted in ReleaseNote
1 parent 0db7139 commit 4fba621

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: RELEASE-NOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ This includes API changes we did not warn about since at least `3.11.0` (2021-01
133133
- Adding support for blackjax's NUTS sampler `pymc.sampling_jax` (see [#5477](ihttps://github.com/pymc-devs/pymc/pull/5477))
134134
- `pymc.sampling_jax` samplers support `log_likelihood`, `observed_data`, and `sample_stats` in returned InferenceData object (see [#5189](https://github.com/pymc-devs/pymc/pull/5189))
135135
- Adding support for `pm.Deterministic` in `pymc.sampling_jax` (see [#5182](https://github.com/pymc-devs/pymc/pull/5182))
136+
- Added an alternative parametrization, `logit_p` to `pm.Binomial` and `pm.Categorical` distributions (see [5637](https://github.com/pymc-devs/pymc/pull/5637)).
136137
- ...
137138

138139

Diff for: pymc/distributions/discrete.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ class Binomial(Discrete):
106106
107107
Parameters
108108
----------
109-
n: int
109+
n : int
110110
Number of Bernoulli trials (n >= 0).
111-
p: float
111+
p : float
112112
Probability of success in each trial (0 < p < 1).
113+
logit_p : float
114+
Alternative log odds for the probability of success.
113115
"""
114116
rv_op = binomial
115117

@@ -1253,9 +1255,11 @@ class Categorical(Discrete):
12531255
12541256
Parameters
12551257
----------
1256-
p: array of floats
1258+
p : array of floats
12571259
p > 0 and the elements of p must sum to 1. They will be automatically
12581260
rescaled otherwise.
1261+
logit_p : float
1262+
Alternative log odds for the probability of success.
12591263
"""
12601264
rv_op = categorical
12611265

0 commit comments

Comments
 (0)