algorithms.entropy¶
Module: algorithms.entropy
¶
Functions¶
-
nitime.algorithms.entropy.
conditional_entropy
(x, y)¶ The conditional entropy H(X|Y) = H(Y,X) - H(Y). X conditioned on Y
-
nitime.algorithms.entropy.
entropy
(*X)¶ Calculate the entropy of a variable, or joint entropy of several variables.
- Parameters
X : array, or list of arrays
Variable or variables to compute entropy/joint entropy on
Notes
This function can be used to calculate the entropy of a single variable (provided as a single input) or to calculate the joint entropy between two variables (provided as a series of inputs)
-
nitime.algorithms.entropy.
entropy_cc
(x, y)¶ The entropy correlation coefficient:
p(H) = sqrt(MI(X, Y) / 0.5 * (H(X) + H(Y)))
-
nitime.algorithms.entropy.
mutual_information
(x, y)¶ The mutual information between two variables
MI(X, Y) = H(X) + H(Y) - H(X | Y)
- Parameters
x, y : array
- Returns
array : mutual information between x and y
-
nitime.algorithms.entropy.
transfer_entropy
(x, y, lag=1)¶ Transfer entropy for two given signals.
- Parameters
x : array
source
- yarray
target
lag : int
- Returns
array : Transfer entropy from x to y