chainer.distributions.LogNormal¶
-
class
chainer.distributions.LogNormal(mu, sigma)[source]¶ Logatithm Normal Distribution.
The probability density function of the distribution is expressed as
\[p(x;\mu,\sigma) = \frac{1}{\sqrt{2\pi\sigma^2}x} \exp\left(-\frac{(\log{x}-\mu)^2}{2\sigma^2}\right)\]Parameters: - mu (
Variableornumpy.ndarrayorcupy.ndarray) – Parameter of distribution \(\mu\). - sigma (
Variableornumpy.ndarrayorcupy.ndarray) – Parameter of distribution \(\sigma\).
Methods
-
cdf(x)[source]¶ Evaluates the cumulative distribution function at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Cumulative distribution function value evaluated at x. Return type: Variable
-
icdf(x)[source]¶ Evaluates the inverse cumulative distribution function at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Inverse cumulative distribution function value evaluated at x. Return type: Variable
-
log_cdf(x)[source]¶ Evaluates the log of cumulative distribution function at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Logarithm of cumulative distribution function value evaluated at x. Return type: Variable
-
log_prob(x)[source]¶ Evaluates the logarithm of probability at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Logarithm of probability evaluated at x. Return type: Variable
-
log_survival_function(x)[source]¶ Evaluates the logarithm of survival function at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Logarithm of survival function value evaluated at x. Return type: Variable
-
perplexity(x)[source]¶ Evaluates the perplexity function at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Perplexity function value evaluated at x. Return type: Variable
-
prob(x)[source]¶ Evaluates probability at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Probability evaluated at x. Return type: Variable
-
sample(sample_shape=())[source]¶ Samples random points from the distribution.
This function calls sample_n and reshapes a result of sample_n to sample_shape + batch_shape + event_shape. On implementing sampling code in an inherited ditribution class, it is not recommended to override this function. Instead of doing this, it is preferable to override sample_n.
Parameters: sample_shape ( tupleofint) – Sampling shape.Returns: Sampled random points. Return type: Variable
-
sample_n(n)[source]¶ Samples n random points from the distribution.
This function returns sampled points whose shape is (n,) + batch_shape + event_shape. When implementing sampling code in a subclass, it is recommended to override this method.
Parameters: n (int) – Sampling size. Returns: sampled random points. Return type: Variable
-
survival_function(x)[source]¶ Evaluates the survival function at the given points.
Parameters: x ( Variableornumpy.ndarrayorcupy.ndarray) – Data points in the domain of the distributionReturns: Survival function value evaluated at x. Return type: Variable
Attributes
-
batch_shape¶ Returns the shape of a batch.
Returns: The shape of a sample that is not identical and indipendent. Return type: tuple
-
covariance¶ Returns the covariance of the distribution.
Returns: The covariance of the distribution. Return type: Variable
-
entropy¶ Returns the entropy of the distribution.
Returns: The entropy of the distribution. Return type: Variable
-
event_shape¶ Returns the shape of an event.
Returns: The shape of a sample that is not identical and independent. Return type: tuple
-
mean¶ Returns the mean of the distribution.
Returns: The mean of the distribution. Return type: Variable
-
mode¶ Returns the mode of the distribution.
Returns: The mode of the distribution. Return type: Variable
-
mu¶
-
params¶ Returns the parameters of the distribution.
Returns: The parameters of the distribution. Return type: dict
-
sigma¶
-
stddev¶ Returns the standard deviation of the distribution.
Returns: The standard deviation of the distribution. Return type: Variable
-
support¶ Returns the support of the distribution.
Returns: String that means support of this distribution. Return type: str
- mu (