Multivariate MI, adding conditionals error

33 views
Skip to first unread message

Thomas Varley

unread,
Jul 7, 2023, 11:47:54 AM7/7/23
to IDTxl
I am trying to add conditionals to a multivariate mutual information inference and keep getting an error I don't understand. I am trying to manually add the lags for the target variable that were produced by the AIS estimator.

Here's a minimal model that should reproduce the issue:

data = Data(np.random.randint(0,2,(5,10_000)), dim_order="ps", normalise=False)

settings = {'cmi_estimator' : 'JidtDiscreteCMI',
            'max_lag_sources' : 1,
            'max_lag_targets' : 1,
            'min_lag_sources' : 1,
            'min_lag_targets' : 1,
            'permute_in_time' : True,
            'perm_type' : 'circular',
            'perm_range' : 10,
            'n_perm_max_stat' : 250,
            'n_perm_min_stat' : 250,
            'n_perm_omnibus' : 250,
            'n_perm_max_seq' : 250,
            'local_values' : False,
            'add_conditionals' : [(0, 1), (0,2)], # Manually adding in the history of the target from the AIS estimator
            }

inference = MultivariateMI()
results = inference.analyse_single_target(settings, data, target=0, sources=[1,2,3,4])

p.wol...@gmail.com

unread,
Sep 17, 2023, 5:23:29 AM9/17/23
to IDTxl
Hi Thomas,

this comes a bit late, but maybe it is still useful to you or others:
The implementation for adding these conditionals is a bit limited. It currently only allows to add variables with a lag that is equal to or smaller than max_lag_sources. There is no specific reason for that, that's just the way the functionality was implemented. I will open an issue to fix this and also allow to include variables that are further in the past than what the algorithm checks during the iterative inclusion. 

A quick fix is to set the max_lag_sources to 2. 

Best,
Patricia

Reply all
Reply to author
Forward
0 new messages