mxnet.gluon.probability.distributions.binomial¶
Binomial distribution class.
Classes
|
Create a binomial distribution object. |
- class mxnet.gluon.probability.distributions.binomial.Binomial(n=1, prob=None, logit=None, validate_args=None)[source]¶
Bases:
DistributionCreate a binomial distribution object.
- Parameters:
n (scalar) – Non-negative interger of Bernoulli trials to stop.
prob (Tensor or scalar, default None) – Probability of sampling 1.
logit (Tensor or scalar, default None) – The log-odds of sampling 1.
- 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.
- property variance¶
Returns the variance of the distribution.