mxnet.gluon.probability.distributions.laplace¶
Laplace distribution
Classes
|
Create a laplace distribution object. |
- class mxnet.gluon.probability.distributions.laplace.Laplace(loc=0.0, scale=1.0, validate_args=None)[source]¶
Bases:
DistributionCreate a laplace distribution object.
- Parameters:
loc (Tensor or scalar, default 0) – mean of the distribution.
scale (Tensor or scalar, default 1) – scale 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.
- 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.