ELIFE-ASU / Inform

A cross platform C library for information analysis of dynamical systems
https://elife-asu.github.io/Inform
MIT License
21 stars 3 forks source link

Incorrect Results for Complete Transfer Entropy with Multiple Initial Conditions #78

Closed dglmoore closed 4 years ago

dglmoore commented 6 years ago

Description

Complete transfer entropy is designed in such a way that if a background process is informationally equivalent to the source node, then TE=0. For example, inform_transfer_entropy behaves as expected in the following example:

int const xs[9] = {0,1,1,1,1,0,0,0,0};
int const ys[9] = {0,0,1,1,1,1,0,0,0};
int const *back = xs;
double te =  inform_transfer_entropy(xs, ys, back, 1, 1, 9, 2, 2, NULL);
assert(te == 0.0);

However, when we move up to multiple initial conditions, something goes awry:

int const xs[18] = {1,0,0,0,0,1,1,1,1,
                    1,1,1,1,0,0,0,1,1};                                              
int const ys[18] = {0,0,1,1,1,1,0,0,0,                                               
                    1,0,0,0,0,1,1,1,0};  
int const *back = xs;
double te =  inform_transfer_entropy(xs, ys, back, 1, 2, 9, 2, 2, NULL);
assert(te != 0.0);
// te ~ 0.536413