JuliaDynamics / TransferEntropy.jl

Transfer entropy (conditional mutual information) estimators for the Julia language
https://juliadynamics.github.io/CausalityTools.jl/stable/
Other
14 stars 5 forks source link

Bootstrap based nonuniform embedding (BBNUE) estimator #80

Closed kahaaga closed 2 years ago

kahaaga commented 2 years ago

A version of the NUE estimator from Montalto, A.; Faes, L.; Marinazzo, D. MuTE: A MATLAB toolbox to compare established and novel estimators of the multivariate transfer entropy. PLoS ONE 2014, 9, e109462.

Datseris commented 2 years ago

@kahaaga I am not familiar with this method and I won't have time to read the paper to get the necessary amount of familiarity. Thus, I cannot review the actual source code but only the documentation. Just letting you know in advance.

kahaaga commented 2 years ago

@kahaaga I am not familiar with this method and I won't have time to read the paper to get the necessary amount of familiarity. Thus, I cannot review the actual source code but only the documentation. Just letting you know in advance.

@Datseris No worries! I don't expect you to learn a new method just for a PR here. You input on the documentation and interface continues to be very valuable.

Ah, I see. I guess that's a reason to explain this in the docstring of transfer entropy. Okay, then I think the best thing to do is to create a new function alltogether. I think it is not the best idea to use the same name transferentropy for such a massively different return signature. It is probably more intuitive to make a new function and put it in the docs in the same section as BBNAU.

I agree. I hesitated a bit by re-using transferentropy. Maybe it could be an idea in the future to use some like optim_transferentropy(source, target, [cond], est) as an analogue to transferentropy(source, target, [cond], est) for estimators that use some optimization procedure?

There are several other similar methods that optimize the embedding that I'm implementing at the moment. However, I'm not entirely sure if they would all return the same information yet. Thus, I agree, and think I will just make a method-specific function bbnue(source, target, [cond], est) instead of transferentropy(source, target, [cond], est::BBNUE).

Thanks for the input!

codecov-commenter commented 2 years ago

Codecov Report

Merging #80 (2685b32) into master (4d5f6ba) will increase coverage by 5.30%. The diff coverage is 92.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #80      +/-   ##
==========================================
+ Coverage   72.35%   77.65%   +5.30%     
==========================================
  Files           8       10       +2     
  Lines         340      461     +121     
==========================================
+ Hits          246      358     +112     
- Misses         94      103       +9     
Impacted Files Coverage Δ
src/transferentropy/interface.jl 75.00% <ø> (ø)
src/transferentropy/autoutils.jl 92.10% <92.10%> (ø)
src/transferentropy/bbnue.jl 100.00% <100.00%> (ø)
src/transferentropy/transferoperator.jl 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4d5f6ba...2685b32. Read the comment docs.

Datseris commented 2 years ago

yeah bbnue(...) seems best