TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes.

tfp.edward2.NegativeBinomial

Create a random variable for NegativeBinomial.

Aliases:

tfp.edward2.NegativeBinomial(
*args,
**kwargs
)

See NegativeBinomial for more details.

RandomVariable.

Original Docstring for Distribution

Construct NegativeBinomial distributions.

Args:

• total_count: Non-negative floating-point Tensor with shape broadcastable to [B1,..., Bb] with b >= 0 and the same dtype as probs or logits. Defines this as a batch of N1 x ... x Nm different Negative Binomial distributions. In practice, this represents the number of negative Bernoulli trials to stop at (the total_count of failures). Its components should be equal to integer values.
• logits: Floating-point Tensor with shape broadcastable to [B1, ..., Bb] where b >= 0 indicates the number of batch dimensions. Each entry represents logits for the probability of success for independent Negative Binomial distributions and must be in the open interval (-inf, inf). Only one of logits or probs should be specified.
• probs: Positive floating-point Tensor with shape broadcastable to [B1, ..., Bb] where b >= 0 indicates the number of batch dimensions. Each entry represents the probability of success for independent Negative Binomial distributions and must be in the open interval (0, 1). Only one of logits or probs should be specified.
• validate_args: Python bool, default False. When True distribution parameters are checked for validity despite possibly degrading runtime performance. When False invalid inputs may silently render incorrect outputs.
• allow_nan_stats: Python bool, default True. When True, statistics (e.g., mean, mode, variance) use the value "NaN" to indicate the result is undefined. When False, an exception is raised if one or more of the statistic's batch members are undefined.
• name: Python str name prefixed to Ops created by this class.