pymc.Categorical#

class pymc.Categorical(name, *args, **kwargs)[source]#

Categorical log-likelihood.

The most general discrete distribution. The pmf of this distribution is

\[f(x \mid p) = p_x\]

(Source code, png, hires.png, pdf)

../../../_images/pymc-Categorical-1.png

Support

\(x \in \{0, 1, \ldots, |p|-1\}\)

Parameters
parray of floats

p > 0 and the elements of p must sum to 1.

logit_pfloat

Alternative log odds for the probability of success.

Methods

Categorical.__init__(*args, **kwargs)

Categorical.dist([p, logit_p])

Creates a tensor variable corresponding to the cls distribution.

Categorical.logp(p)

Calculate log-probability of Categorical distribution at specified value.

Categorical.moment(size, p)

Attributes

rv_op