tf.contrib.distributions.Multinomial.__init__()

tf.contrib.distributions.Multinomial.__init__(n, logits=None, p=None, validate_args=False, allow_nan_stats=True, name='Multinomial')

Initialize a batch of Multinomial distributions.

Args:
  • n: Non-negative floating point tensor with shape broadcastable to [N1,..., Nm] with m >= 0. Defines this as a batch of N1 x ... x Nm different Multinomial distributions. Its components should be equal to integer values.
  • logits: Floating point tensor representing the log-odds of a positive event with shape broadcastable to [N1,..., Nm, k], m >= 0, and the same dtype as n. Defines this as a batch of N1 x ... x Nm different k class Multinomial distributions.
  • p: Positive floating point tensor with shape broadcastable to [N1,..., Nm, k] m >= 0 and same dtype as n. Defines this as a batch of N1 x ... x Nm different k class Multinomial distributions. p's components in the last portion of its shape should sum up to 1.
  • validate_args: Boolean, default False. Whether to assert valid values for parameters n and p, and x in prob and log_prob. If False, correct behavior is not guaranteed.
  • allow_nan_stats: Boolean, default True. If False, raise an exception if a statistic (e.g. mean/mode/etc...) is undefined for any batch member. If True, batch members with valid parameters leading to undefined statistics will return NaN for this statistic.
  • name: The name to prefix Ops created by this distribution class.

  • Examples:

# Define 1-batch of 2-class multinomial distribution,
# also known as a Binomial distribution.
dist = Multinomial(n=2., p=[.1, .9])

# Define a 2-batch of 3-class distributions.
dist = Multinomial(n=[4., 5], p=[[.1, .3, .6], [.4, .05, .55]])
doc_TensorFlow
2016-10-14 12:57:14
Comments
Leave a Comment

Please login to continue.