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

Effective Information #19

Closed dglmoore closed 7 years ago

dglmoore commented 8 years ago

Implement cause, effect and effective information as described by Hoel, Albantakis and Tononi.

Proposed API

EXPORT double inform_effective_info(int const *tpm, int const *intervention, size_t n,
    inform_error *err);

Example Usage

int series[10] = {0,1,1,0,1,0,0,1,0,1}

inform_error err = INFORM_SUCCESS;
int *tpm = inform_tpm(series, 1, 10, 2, NULL, &err);
assert(inform_succeeded(&err));

inform_effective_info(tpm, (double[2]){0.25, 0.75}, 2, &err); // 0.471407
assert(inform_succeeded(&err);