TE value without Statistical Significance Test

114 views
Skip to first unread message

Onur Dogan

unread,
Mar 3, 2021, 2:00:57 PM3/3/21
to IDTxl
Hi!
As I know Inference algorithm estimates Conditional TE values first and then, do the Statistical Significance Test.
I wanna get Conditional TE values without/before the Statistical Significance Test. I examined JidtDiscreteCMI and estimate function, I think I can get TE value from these two functions and I tried to do this. (est = JidtKraskovCMI(settings)
                                      cmi = est.estimate(source_cor, target, source_uncor))
However, I couldn't specify lags. Do I specify lags in the estimator input part? 

How can I get a Conditional TE value without the Statistical Significance Test? 
Thanks,
Onur.
 

p.wol...@gmail.com

unread,
Mar 4, 2021, 11:42:47 AM3/4/21
to IDTxl
Hi Onur,
in general, we don't return non-significant TE estimates as the raw estimated values can hardly be interpreted (even though the Kraskov estimator has good bias properties, the bias is not zero and depends on things such as the number of samples, dimensionality of the input variables, and the strength of the dependency, see Kraskov, 2004, Phys Rev E or Gao, 2015, JMLR). So, the algorithms only return significant TE values for the sake of completeness or for making relative statements (such as, te1 > te2, even though this relationship should also be tested for statistical significance).

Also, do you want to calculate the conditional TE/CMI for each individual past source variable or for whole source processes? Have a look at this Figure in the wiki, where each blue box corresponds to one variable in one processes' past, while one row of blue boxes corresponds to a whole source processes (comprising all past variables for that process). Either way, the dimensionality of variables entering the CMI/TE estimation is extremely large already for relatively small problems. This very likely leads to a severe undersampling of the variables such that a CMI can not be estimated reliably. This is the reason, we approach the problem of estimating (multivariate) TE using a greedy approach that selects only the subset of relevant variables in the first place.

Generally, to estimate CMI/TE, you can use the JidtKraskovCMI estimator or the JidtKraskovTE estimator to estimate the TE between two time series if all embedding parameters and delays are known (see also the estimators' docs). Note that both estimators are just wrappers of estimators from the JIDT toolbox, so you may also want to have a look at that code.

Best,
Patricia

Onur Dogan

unread,
Mar 8, 2021, 3:03:06 PM3/8/21
to IDTxl
Hi again,
Actually, I assume that sources lag and target's lag known. If I give specific lags to IDTxl (max_lag=2, min_lag=2), It does the Significance test and as you know, It takes a long time in the Kraskov estimator in one machine. 
However, I wanna calculate the conditional Transfer Entropy value with known lags. I know the JIDT toolbox but, as I know I can give one condition on the JIDT toolbox. I wanna give more than one condition and I thought IDTxl may be a good option for this problem. 
However, If I use directly the JidtKraskovTE estimator I can't enter the condition and If I use the JidtKraskovCMI estimator, I think I can't enter lags and more than one condition. 
Should I look at the _calculate_single_link? If I look at this function, I think  I can enter more than one condition. However, I couldn't understand how I will give my data to _calculate_single_link function.
Thank you,
Onur.

4 Mart 2021 Perşembe tarihinde saat 19:42:47 UTC+3 itibarıyla p.wol...@gmail.com şunları yazdı:

p.wol...@gmail.com

unread,
Mar 9, 2021, 8:32:44 AM3/9/21
to IDTxl
Hi Onur,
I see, I would go about this as follows: if you have your data in the IDTxl data object, you can retrieve the realisations for variables with specific lags via the get_realisations() function (see also the docs).

= 0  # to make up a source and target index in your data
= 1
lag = 2  # took this from your analysis setup
current_value = (t, lag)  # this is the absolute index of the first entry in the target time series that we can use as a realisation/sample for estimation, while allowing to also look at source time series with the desired lag
ind_source_past = [(s, 0)]  # list of variables, where each variable is a tuple (<source index>, <sample index>), here the time/sample index is current_value[1] - lag
ind_target_past = [(t, 1)]  # assuming, the relevant target past has a lag of 1
source_realisations = data.get_realisations(current_value,  ind_source_past)[0]
target_realisations = data.get_realisations(current_value, [current_value])[0]
conditional_realisations = data.get_realisations(current_value, ind_target_past)[0]

est = JidtKraskovCMI()
cmi = est.estimate(source_realisations,  target_realisations,  conditional_realisations)
print(cmi)

Of course, you can make this a conditional TE by adding further source variables to the list when retrieving the conditional_realisation. Also, if your target past state comprises more past variables, you can add those there. Also, if your source past state consists of multiple past variables, you may extend the list of indices when creating  source_realisations.

Best, Patricia

Onur Dogan

unread,
Mar 12, 2021, 2:06:24 PM3/12/21
to IDTxl
Hi again,
First of all, thank you!
With your explanation, I understand how to estimate. However,  Does it give a Conditional Transfer Entropy value? or It gives a CMI? 
Because when I try that code, on a data, It gave a different value from a normal IDTxl code for multivariate te estimation on the same data. And I tried data on Conditional Mutual Information of the JIDT toolbox I got the same value as The code above give.
Thanks,


9 Mart 2021 Salı tarihinde saat 16:32:44 UTC+3 itibarıyla p.wol...@gmail.com şunları yazdı:

p.wol...@gmail.com

unread,
Mar 17, 2021, 4:42:11 AM3/17/21
to IDTxl
Hi,
generally, the code above estimates a CMI. TE and conditional TE are also CMIs, it only depends on what you condition on.
For a conditional TE, you can add the things you want to condition on to the conditioning set ('conditional_realisations' above), for example, other nodes in your network.

The above code is really just a wrapper for the JIDT estimator. So getting identical results from this code and calling JIDT directly is expected and a good sanity check. The multivariate TE algorithm on the other hand does a lot of things before/around estimating the final conditional TEs and the comparison is less straightforward. Could you provide a short example where the CMI estimate and the corresponding mTE estimation give different results?

Thanks, Patricia

Joseph Lizier

unread,
Mar 21, 2021, 8:06:33 PM3/21/21
to p.wol...@gmail.com, IDTxl
Thanks Patricia, and sorry to be late to the part on this. As Particia says, we'd need to have a short example of the two being different to provide further comment.

Also as a side note -- "I know the JIDT toolbox but, as I know I can give one condition on the JIDT toolbox. I wanna give more than one condition ..." -- actually you can provide multiple conditionals in JIDT for both CMI and CTE. The AutoAnalyser GUI just doesn't do that for you at the moment, which may be the source of confusion. You can simply take code generated by the AutoAnalyser and then add in a 2D array as the conditional instead of the 1D array there. If you've got further queries on that, pls add it on the JIDT list.

--joe



--
You received this message because you are subscribed to the Google Groups "IDTxl" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idtxl+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/idtxl/93064318-f0e9-42bf-9a77-54dbdadc9f48n%40googlegroups.com.
Message has been deleted

Onur Dogan

unread,
Mar 27, 2021, 7:27:09 AM3/27/21
to IDTxl
Thank you for the explanation, I didn't know I can give more than one condition.
I will try JIDT again for this problem. If I have further queries, I will add them to the JIDT list.
Onur.

22 Mart 2021 Pazartesi tarihinde saat 03:06:33 UTC+3 itibarıyla joseph...@gmail.com şunları yazdı:
Reply all
Reply to author
Forward
0 new messages