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

Allow LocalPermutationTest to be used with TEShannon estimated using dedicated TE estimators #350

Merged
merged 14 commits into from
Oct 4, 2023

Conversation

kahaaga
Copy link
Member

@kahaaga kahaaga commented Oct 3, 2023

Fixes

This fixes #348.

The fix here was actually a bit more involved than I thought. Runge's LocalPermutationTest is based on conditional mutual information (CMI), and requires that we estimate that CMI in a certain way (that depends on if entropy-based, mutual information-based or CMI-based estimation is used).

Using any of these estimation methods, we can simply re-write transfer entropy as CMI, construct relevant marginals and apply the LocalPermutationTest directly.

However, dedicated transfer entropy estimators such as Zhu1 or Lindner can't easily be expressed in terms of any of the above-mentioned estimation methods. Therefore, I here introduce a new conditional independence test, specifically aimed for transfer entropy. The concept is similar to what is done for the CMI-based LocalPermutationTest: shuffle one variable according to local neighbor information in the conditioning variable. The shuffled variable for transfer entropy is the first( source) variable, similar to what we do for SurrogateTest.

I don't think this transfer entropy-specific local permutation test appears in the literature anywhere, so it would be fun to explore it further at some point in a paper, but that's for future work.

Misc

  • Low-level estimation code for Lindner now has an additional layer that is utilized to avoid excessive StateSpaceSet allocations during repeated analysis, e.g. using LocalPermutationTest. Thus, using Lindner is now faster with LocalPermutationTest than it would otherwise be.

TODO:

  • Add tests (analytical tests using e.g. AR-system)?
  • Fix tests

@kahaaga kahaaga added the bug fix label Oct 3, 2023
@kahaaga kahaaga merged commit 477bd4c into main Oct 4, 2023
1 of 2 checks passed
@kahaaga kahaaga deleted the surrogate_test_with_transferentropy branch October 4, 2023 16:14
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

Successfully merging this pull request may close these issues.

estimator Lindner errors with Nothing
1 participant