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
249 stars 76 forks source link

TypeError when using JidtDiscreteCMI #88

Closed Rhydderch closed 2 years ago

Rhydderch commented 2 years ago

Hello,

When I try to use the estimator for discrete data, I get the following error:

TypeError: No matching overloads found for constructor infodynamics.measures.discrete.ConditionalMutualInformationCalculatorDiscrete(), options are:
    public infodynamics.measures.discrete.ConditionalMutualInformationCalculatorDiscrete(int,int,int)

Here's my code:

#data structure: 6 processes, 56 samples/time points, 39 replications (3D array: 39x56x6)
dat = Data(mydata, dim_order='rsp')
network_analysis = MultivariateTE()
settings = {
  'cmi_estimator': 'JidtDiscreteCMI',
            'max_lag_sources': 3,
            'min_lag_sources': 0
          }

results = network_analysis.analyse_network(settings=settings, data=dat)

What am I doing wrong here?

PS: I don't encounter the same errors with the "OpenCLKraskovCMI" for continuous data (though, my variables range from 0-100, so I'm not sure the KSG estimator is the right choice)

mwibral commented 2 years ago

Hi,

if your variables range from 0-100 and almost all values are there, you should perhaps use the kraskov estimator (with some added epsilon noise), because the discrete estimator will not be able to work with so many symbols in the alphabets of your variables.

Michael


From: Yorgo @.***> Sent: Wednesday, November 16, 2022 10:18:52 PM To: pwollstadt/IDTxl Cc: Subscribed Subject: [pwollstadt/IDTxl] TypeError when using JidtDiscreteCMI (Issue #88)

Hello,

When I try to use the estimator for discrete data, I get the following error:

TypeError: No matching overloads found for constructor infodynamics.measures.discrete.ConditionalMutualInformationCalculatorDiscrete(), options are: public infodynamics.measures.discrete.ConditionalMutualInformationCalculatorDiscrete(int,int,int)

Here's my code:

data structure: 6 processes, 56 samples/time points, 39 replications (3D array: 39x56x6)

dat = Data(mydata, dim_order='rsp') network_analysis = MultivariateTE() settings = { 'cmi_estimator': 'JidtDiscreteCMI', 'max_lag_sources': 3, 'min_lag_sources': 0 }

results = network_analysis.analyse_network(settings=settings, data=dat)

What am I doing wrong here?

PS: I don't encounter the same errors with the "OpenCLKraskovCMI" for continuous data (though, my variables range from 0-100, so I'm not sure the KSG estimator is the right choice)

— Reply to this email directly, view it on GitHubhttps://github.com/pwollstadt/IDTxl/issues/88, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACFJQGR7PVH6VKCCSHW3K5LWIVFTZANCNFSM6AAAAAASCVUDLQ. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Rhydderch commented 2 years ago

Hi Michael,

Thank you very much for your answer and for clarifying. The kraskov estimator works well.

Yorgo