Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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