mxnet.gluon.probability.distributions.normal¶
Normal distribution
Classes
|
Create a Normal distribution object. |
- class mxnet.gluon.probability.distributions.normal.Normal(loc=0.0, scale=1.0, validate_args=None)[source]¶
Bases:
ExponentialFamilyCreate a Normal distribution object.
- Parameters:
loc (Tensor or scalar, default 0) – mean of the distribution.
scale (Tensor or scalar, default 1) – standard deviation of the distribution
- 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.
- entropy()[source]¶
Return the entropy of a distribution. The entropy of distributions in exponential families could be computed by: H(P) = F(theta) - <theta, F(theta)’> - E_p[k(x)]
- log_prob(value)[source]¶
Compute the log likelihood of value.
- Parameters:
value (Tensor) – Input data.
- Returns:
Log likelihood of the input.
- Return type:
Tensor
- property mean¶
Returns the mean of the distribution.
- sample(size=None)[source]¶
Generate samples of size from the normal distribution parameterized by self._loc and self._scale
- Parameters:
size (Tuple, Scalar, or None) – Size of samples to be generated. If size=None, the output shape will be broadcast(loc, scale).shape
- Returns:
Samples from Normal distribution.
- Return type:
Tensor
- sample_n(size=None)[source]¶
Generate samples of (batch_size + broadcast(loc, scale).shape) from the normal distribution parameterized by self._loc and self._scale
- Parameters:
size (Tuple, Scalar, or None) – Size of independent batch to be generated from the distribution.
- Returns:
Samples from Normal distribution.
- Return type:
Tensor
- property stddev¶
Returns the standard deviation of the distribution.
- property variance¶
Returns the variance of the distribution.