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.dist([p, logit_p])

Create a tensor variable corresponding to the cls distribution.