Skip to content

Commit

Permalink
Updated pymc.DiscreteWeibull docstring (pymc-devs#6283)
Browse files Browse the repository at this point in the history
* Updated pymc.DiscreteWeibull docstring
  • Loading branch information
hyosubkim authored and wrongu committed Dec 1, 2022
1 parent a6d9c0b commit 7618dbb
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion pymc/distributions/discrete.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def rng_fn(cls, rng, q, beta, size):


class DiscreteWeibull(Discrete):
R"""Discrete Weibull log-likelihood
R"""Discrete Weibull log-likelihood.
The discrete Weibull distribution is a flexible model of count data that
can handle both over- and under-dispersion.
Expand All @@ -471,6 +471,7 @@ class DiscreteWeibull(Discrete):
.. math:: f(x \mid q, \beta) = q^{x^{\beta}} - q^{(x + 1)^{\beta}}
.. plot::
:context: close-figs
import matplotlib.pyplot as plt
import numpy as np
Expand Down Expand Up @@ -499,6 +500,14 @@ def DiscreteWeibull(q, b, x):
Mean :math:`\mu = \sum_{x = 1}^{\infty} q^{x^{\beta}}`
Variance :math:`2 \sum_{x = 1}^{\infty} x q^{x^{\beta}} - \mu - \mu^2`
======== ======================
Parameters
----------
q : tensor_like of float
Shape parameter (0 < q < 1).
beta : tensor_like of float
Shape parameter (beta > 0).
"""
rv_op = discrete_weibull

Expand Down

0 comments on commit 7618dbb

Please sign in to comment.