mxnet.gluon.probability.distributions.distribution

Base distribution class.

Classes

Distribution([event_dim, validate_args])

Base class for distribution.

class mxnet.gluon.probability.distributions.distribution.Distribution(event_dim=None, validate_args=None)[source]

Bases: object

Base class for distribution.

Parameters:
  • event_dim (int, default None) – Variable indicating the dimension of the distribution’s support.

  • validate_args (bool, default None) – Whether to validate the distribution parameters

property arg_constraints

Returns a dictionary from parameter names to Constraint objects that should be satisfied by each parameter of this distribution. Args that are not ndarray/symbol need not appear in this dict.

broadcast_to(batch_shape)[source]

Returns a new distribution instance with parameters expanded to batch_shape. This method calls numpy.broadcast_to on the parameters.

Parameters:

batch_shape (Tuple) – The batch shape of the desired distribution.

cdf(value)[source]

Returns the cumulative density/mass function evaluated at value.

entropy()[source]

Returns entropy of distribution.

enumerate_support()[source]

Returns a tensor that contains all values supported by a discrete distribution.

icdf(value)[source]

Returns the inverse cumulative density/mass function evaluated at value.

log_prob(value)[source]

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

property mean

Returns the mean of the distribution.

pdf(value)[source]

Returns the probability density/mass function evaluated at value.

perplexity()[source]

Returns perplexity of distribution.

sample(size=None)[source]

Generates a shape shaped sample.

sample_n(size)[source]

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

property stddev

Returns the standard deviation of the distribution.

property support

Returns a function representing the distribution’s support.

property variance

Returns the variance of the distribution.