Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in calculating local transfer entropy #39

Open
wirkuttis opened this issue Sep 22, 2022 · 0 comments
Open

Bug in calculating local transfer entropy #39

wirkuttis opened this issue Sep 22, 2022 · 0 comments

Comments

@wirkuttis
Copy link

Hi there,

Thanks for the great library!
I discovered the following bug.

In the documentation Transfer Entropy considers X as Source input and Y as Target input. https://elife-asu.github.io/PyInform/timeseries.html#notation

In the source code, transfer entropy is calculated as transfer_entropy(source, target, k, condition=None, local=False) but in the preprocessing the source is assigned to ys = np.ascontiguousarray(source, np.int32) (which should be assigned to xs) and the target to xs = np.ascontiguousarray(target, np.int32) (which should be ys).

As a result _local_transfer_entropy(ys, xs) seems to provide the reversed result of information flow from source to target distribution rather than a target to the source distribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant