tf.contrib.distributions.Binomial.__init__()

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

Initialize a batch of Binomial distributions.

Args:
  • n: Non-negative floating point tensor with shape broadcastable to [N1,..., Nm] with m >= 0 and the same dtype as p or logits. Defines this as a batch of N1 x ... x Nm different Binomial 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] m >= 0, and the same dtype as n. Each entry represents logits for the probability of success for independent Binomial distributions.
  • p: Positive floating point tensor with shape broadcastable to [N1,..., Nm] m >= 0, p in [0, 1]. Each entry represents the probability of success for independent Binomial distributions.
  • validate_args: Boolean, default False. Whether to assert valid values for parameters n, p, and x in prob and log_prob. If False and inputs are invalid, 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 a binomial distribution.
dist = Binomial(n=2., p=.9)

# Define a 2-batch.
dist = Binomial(n=[4., 5], p=[.1, .3])
doc_TensorFlow
2016-10-14 12:48:01
Comments
Leave a Comment

Please login to continue.