mxnet.gluon.probability.distributions.dirichlet

Dirichlet Distribution.

Classes

Dirichlet(alpha[, validate_args])

Create a Dirichlet distribution object.

class mxnet.gluon.probability.distributions.dirichlet.Dirichlet(alpha, validate_args=None)[source]

Bases: ExponentialFamily

Create a Dirichlet distribution object.

Parameters:

alpha (Tensor or scalar) – Shape parameter of the distribution

entropy()[source]

Return the entropy of a distribution. The entropy of distributions in exponential families could be computed by: H(P) = F(theta) - <theta, F(theta)’> - E_p[k(x)]

log_prob(value)[source]

Returns the log of the probability density/mass function evaluated at value.

property mean

Returns the mean of the distribution.

sample(size=None)[source]

Generates a shape shaped sample.

sample_n(size=None)[source]

Generate samples of (n + parameter_shape) from the distribution.

property variance

Returns the variance of the distribution.