Skip to content

Commit d871b80

Browse files
authored
Implement logcdf method for discrete distributions (#4387)
* Implement logcdf method for discrete distributions * Add release note * Small reformatting * Add more comprehensive bound check for impossible parameters * Fix bounds for logcdf of DiscreteUniform * Add safe values/ parameters for `BetaBinomial`, `Poisson`, and `HyperGeometric` to avoid errors when evaluating negative logcdfs. * Change `check_selfconsistency_discrete_logcdf` to work with negative domains, such as the DiscreteUniform. * Raise TypeError in logcdf methods that only accept scalar values. Fix docstring formatting. * Small change to logcdf methods of `DiscreteWeibull` and `ZeroInflated` making use of `tt.log1p` and `logaddexp`. More informative comment on workaround for `Poisson.logcdf`.
1 parent 02095c2 commit d871b80

File tree

3 files changed

+599
-43
lines changed

3 files changed

+599
-43
lines changed

RELEASE-NOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ It also brings some dreadfully awaited fixes, so be sure to go through the chang
1919
- Option to set `check_bounds=False` when instantiating `pymc3.Model()`. This turns off bounds checks that ensure that input parameters of distributions are valid. For correctly specified models, this is unneccessary as all parameters get automatically transformed so that all values are valid. Turning this off should lead to faster sampling (see [#4377](https://github.com/pymc-devs/pymc3/pull/4377)).
2020
- `OrderedProbit` distribution added (see [#4232](https://github.com/pymc-devs/pymc3/pull/4232)).
2121
- `plot_posterior_predictive_glm` now works with `arviz.InferenceData` as well (see [#4234](https://github.com/pymc-devs/pymc3/pull/4234))
22+
- Add `logcdf` method to all univariate discrete distributions (see [#4387](https://github.com/pymc-devs/pymc3/pull/4387)).
2223

2324
### Maintenance
2425
- Fixed bug whereby partial traces returns after keyboard interrupt during parallel sampling had fewer draws than would've been available [#4318](https://github.com/pymc-devs/pymc3/pull/4318)

0 commit comments

Comments
 (0)