Skip to content

TE from Y to X giving straight zeros #44

@LucasLozada

Description

@LucasLozada

Hi! I am thinking of using PyInform for computing TE for some Global Hydrology Models for my Master Thesis. First, of course I wanted to test it with some toy model to see how it performs.
Basically, what I did is to create for the source (X) a binary sequence (0s and 1s) that gets bigger in each step, while the target (Y) is the same sequence, but just shifted one position to the right. I compute the TE for each sequence size and do several runs to plot the average and standar deviation. This follows the same idea of the first example showb in the PyInform repository:

xs = [0,1,1,1,1,0,0,0,0]
ys = [0,0,1,1,1,1,0,0,0]

Of course, since Y is completely defined by X, the TE from X to Y should converge to 1, while the TE from Y to X should converge to 0 (basically gives no information). For k of 1 this workes fine but when I set k to 2 (or higher), the TE from Y to X gives straight zeros. This is in theory correct, but is not converging to zero, rather computing just zeros.
Also, when I change the shifting position from 1 to 2, things are not working correctly either. TE from X to Y should converge to 0 for k=1 (because the window size is not big enough to capture the information), but it should converge to 1 for any k that is equally big (or bigger) than the shifting position. This is not what I observe, instead it converges to 0 always. On the case of TE from Y to X, something similar happens, where I get just zeros for any k bigger than the shifting position.
I have been dealing with this for some while and I don't know if I am doing something wrong with the data generation or the algorithm implementation, but I hope you can help me understand what is happening.
I include the code that shows my issue

TE issue.txt

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