Extropy
The extropy [7] is a dual to the entropy.
-
extropy(dist, rvs=None, rv_names=None)[source]
Returns the extropy J[X] over the random variables in rvs.
If the distribution represents linear probabilities, then the extropy
is calculated with units of ‘bits’ (base-2).
Parameters : |
- dist (Distribution or float) –
The distribution from which the extropy is calculated. If a float,
then we calculate the binary extropy.
- rvs (list, None) –
The indexes of the random variable used to calculate the extropy.
If None, then the extropy is calculated over all random variables.
This should remain None for ScalarDistributions.
- rv_names (bool) –
If True, then the elements of rvs are treated as random variable
names. If False, then the elements of rvs are treated as random
variable indexes. If None, then the value True is used if the
distribution has specified names for its random variables.
|
Returns: | J (float) –
The extropy of the distribution.
|