Tsallis Entropy¶
The Tsallis entropy is a generalization of the Shannon (or Boltzmann-Gibbs) entropy to the case where entropy is nonextensive. It is given by:
In [1]: In [1]: from dit.other import tsallis_entropy
Non-additivity¶
One interesting property of the Tsallis entropy is the relationship between the joint Tsallis entropy of two indpendent systems, and the Tsallis entropy of those subsystems:
API¶
-
tsallis_entropy
(dist, order, rvs=None, rv_mode=None)[source]¶ Compute the Tsallis entropy of order order.
- Parameters
dist (Distribution) – The distribution to take the Tsallis entropy of.
order (float >= 0) – The order of the Tsallis entropy.
rvs (list, None) – The indexes of the random variable used to calculate the Tsallis entropy of. If None, then the Tsallis entropy is calculated over all random variables.
rv_mode (str, None) – Specifies how to interpret rvs and crvs. Valid options are: {‘indices’, ‘names’}. If equal to ‘indices’, then the elements of crvs and rvs are interpreted as random variable indices. If equal to ‘names’, the the elements are interpreted as random variable names. If None, then the value of dist._rv_mode is consulted, which defaults to ‘indices’.
- Returns
S_q – The Tsallis entropy.
- Return type
- Raises
ditException – Raised if rvs or crvs contain non-existant random variables.
ValueError – Raised if order is not a non-negative float.