tfp.edward2.Binomial(
*args,
**kwargs
)
Create a random variable for Binomial.
See Binomial for more details.
Returns:
RandomVariable.
Original Docstring for Distribution
Initialize a batch of Binomial distributions.
Args:
total_count
: Non-negative floating point tensor with shape broadcastable to[N1,..., Nm]
withm >= 0
and the same dtype asprobs
orlogits
. Defines this as a batch ofN1 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 astotal_count
. Each entry represents logits for the probability of success for independent Binomial distributions. Only one oflogits
orprobs
should be passed in.probs
: Positive floating point tensor with shape broadcastable to[N1,..., Nm]
m >= 0
,probs in [0, 1]
. Each entry represents the probability of success for independent Binomial distributions. Only one oflogits
orprobs
should be passed in.validate_args
: Pythonbool
, defaultFalse
. WhenTrue
distribution parameters are checked for validity despite possibly degrading runtime performance. WhenFalse
invalid inputs may silently render incorrect outputs.allow_nan_stats
: Pythonbool
, defaultTrue
. WhenTrue
, statistics (e.g., mean, mode, variance) use the value "NaN
" to indicate the result is undefined. WhenFalse
, an exception is raised if one or more of the statistic's batch members are undefined.name
: Pythonstr
name prefixed to Ops created by this class.