mxnet.gluon.probability.distributions.multinomial

Multinomial Distribution

Classes

Multinomial(num_events[, prob, logit, ...])

Create a multinomial distribution object.

class mxnet.gluon.probability.distributions.multinomial.Multinomial(num_events, prob=None, logit=None, total_count=1, validate_args=None)[source]

Bases: Distribution

Create a multinomial distribution object.

Parameters:
  • num_events (int) – number of events.

  • prob (Tensor) – probability of each event.

  • logit (Tensor) – unnormalized probability of each event.

  • total_count (int) – number of trials.

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.

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 support

Returns a function representing the distribution’s support.

property variance

Returns the variance of the distribution.