pwollstadt / IDTxl

The Information Dynamics Toolkit xl (IDTxl) is a comprehensive software package for efficient inference of networks and their node dynamics from multivariate time series data using information theory.
http://pwollstadt.github.io/IDTxl/
GNU General Public License v3.0
237 stars 76 forks source link

TypeError / JidtGaussianTE #91

Closed Essy13 closed 10 months ago

Essy13 commented 1 year ago

Hi, I am not yet very familiar with the package. I try to use the JidtGaussianTE estimator and I receive the following:

image

I am practically just trying with demo code now (but was same error with own data). What am I doing wrong? :

image

Essy13 commented 1 year ago

I guess I cannot use the JidtGaussianTE just replacing JidtGaussianCMI in the settings. How can I have the network analysis for all pairs using JidtGaussianTE estimator?

pwollstadt commented 1 year ago

Hi, when using the network analysis as shown in the script, you have to provide a CMI estimator. You will get the multivariate TE estimation with the Gaussian estimator when running the script and specifying JidtGaussianCMI as estimator. For details on how the algorithm works, have a look at this introduction in the wiki.

The JidtGaussianTE estimator is intended as a more low-level estimator to directly estimate TE between two time series when the relevant histories are known. You can have a look at this and the following lines in the demo script on the implemented estimators: https://github.com/pwollstadt/IDTxl/blob/16c6cc52e31ec79f8ec18cd4ea107a7b76525ca2/demos/demo_core_estimators.py#L66.

Essy13 commented 1 year ago

Thank you very much for your reply. I can run the JidtGaussianTE estimator the above described way. I noticed in case of the bivariate network analysis that a connection is indicated with a double ended arrow. In my understanding it means that there are significant CMI into both direction. However I am wondering that the time lag on the arrow is relevant for which of the two cases. In my example the lags are equal and I don't know what if they would differ - would it be the then the one with the higher CMI value?

pwollstadt commented 1 year ago

Hi @Essy13, yes, the double-ended error means that there is TE in both directions. I would check the console output together with the Figure (e.g., by running results.print_edge_list(weights='max_te_lag', fdr=False), see also the Tutorial in the Wiki). The lags describe the estimated delay between the two processes and is not related to the strength of the information transfer. The delay just describes how many time steps it takes for information to be transferred from one process to the other.