ExponentialFamily¶
- class paddle.distribution. ExponentialFamily ( batch_shape=(), event_shape=() ) [source]
-
ExponentialFamily is the base class for probability distributions belonging to exponential family, whose probability mass/density function has the form is defined below
ExponentialFamily is derived from paddle.distribution.Distribution.
\[f_{F}(x; \theta) = \exp(\langle t(x), \theta\rangle - F(\theta) + k(x))\]where \(\theta\) denotes the natural parameters, \(t(x)\) denotes the sufficient statistic, \(F(\theta)\) is the log normalizer function for a given family and \(k(x)\) is the carrier measure.
Distribution belongs to exponential family referring to https://en.wikipedia.org/wiki/Exponential_family
-
entropy
(
)
entropy¶
-
calculate entropy use bregman divergence https://www.lix.polytechnique.fr/~nielsen/EntropyEF-ICIP2010.pdf
- property batch_shape
-
Returns batch shape of distribution
- Returns
-
batch shape
- Return type
-
Sequence[int]
- property event_shape
-
Returns event shape of distribution
- Returns
-
event shape
- Return type
-
Sequence[int]
-
kl_divergence
(
other
)
[source]
kl_divergence¶
-
The KL-divergence between self distributions and other.
-
log_prob
(
value
)
log_prob¶
-
Log probability density/mass function.
- property mean
-
Mean of distribution
-
prob
(
value
)
prob¶
-
Probability density/mass function evaluated at value.
- Parameters
-
value (Tensor) – value which will be evaluated
-
probs
(
value
)
probs¶
-
Probability density/mass function.
Note
This method will be deprecated in the future, please use prob instead.
-
rsample
(
shape=()
)
rsample¶
-
reparameterized sample
-
sample
(
shape=()
)
sample¶
-
Sampling from the distribution.
- property variance
-
Variance of distribution
-
entropy
(
)