Skip to content

Bug in calculating local transfer entropy #39

Description

@wirkuttis

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions