This is a repository of MATLAB functions that can estimate transfer entropy (information flow) from one time series to another using a non-parametric partitioning algorithm. Also included is an example data set that the implemented algorithms can be applied to.

There are three functions used to calculate transfer entropy between time series using different methods of probability density estimation:

[T] = transferEntropyKDE(X,Y,t,w,N,bw_coeff)

Based on Guassian kernel density estimation.

Calls function mdKDE

[T nPar dimPar]=transferEntropyPartition(X,Y,t,w)

Based on the Darbellay-Vajda partitioning algorithm

Calls function DVpartition3D

[T] = transferEntropyRank(X,Y,l,k,t,w,Q)

Based on bin counting with fixed and equally-spaced bins.

Calls function quantentr

The MAT file 'example_data.mat' contains a 1-D structure array of example data that harnesses an information flow from X to Y at a lag of 2 according to: y(i)=[(1+a)*x(i-2)]^2
Different values of the coupling constant 'a' were simulated, along with associated levels of Laplacian noise given by SNR levels.

For a demonstration, run 'demoscript.m'. The plotted results should look like figure 1.

See the individual .m function files for information on how to call them.

See readme_example_data.txt for information on the example data parameters.