From 4c9454e052ed3a261af95811ce398e0ee67ca610 Mon Sep 17 00:00:00 2001 From: Patricia Wollstadt Date: Thu, 8 Apr 2021 13:19:09 +0200 Subject: [PATCH 1/4] Fix bug in statistics of candidate inclusion Fix bug in statistics of candidate inclusion. The maximum statistic did not condition on the already selected variables due to a failure in the call to the function within the variable inclusion functionality. Fixes #65. --- idtxl/network_inference.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/idtxl/network_inference.py b/idtxl/network_inference.py index 5b84c9c4..098e0d69 100755 --- a/idtxl/network_inference.py +++ b/idtxl/network_inference.py @@ -137,7 +137,8 @@ def _include_candidates(self, candidate_set, data): self._idx_to_lag([max_candidate])[0]), end='') try: significant = stats.max_statistic( - self, data, candidate_set, te_max_candidate)[0] + self, data, candidate_set, te_max_candidate, + conditional=self._selected_vars_realisations)[0] except ex.AlgorithmExhaustedError as aee: # The algorithm cannot continue here, so we'll terminate the # check of significance for this candidate, though those From 01e5939be008fc902fd00f796134a3d940bbb1c2 Mon Sep 17 00:00:00 2001 From: Patricia Wollstadt Date: Thu, 8 Apr 2021 13:20:44 +0200 Subject: [PATCH 2/4] Update version number in meta data --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index b08d6679..8c54e94f 100644 --- a/setup.py +++ b/setup.py @@ -10,7 +10,7 @@ name='idtxl', packages=['idtxl'], include_package_data=True, - version='1.0', + version='1.2.2', description='Information Dynamics Toolkit xl', author='Patricia Wollstadt, Joseph T. Lizier, Raul Vicente, Conor Finn, Mario Martinez-Zarzuela, Pedro Mediano, Leonardo Novelli, Michael Wibral', author_email='p.wollstadt@gmail.com', From 42d7dc8cc81a52b653204e75459e26214c4e7fd8 Mon Sep 17 00:00:00 2001 From: Patricia Wollstadt Date: Mon, 19 Apr 2021 14:37:44 +0200 Subject: [PATCH 3/4] Remove default for conditioning set in max stats Remove default for conditioning set in max stats to avoid calls to the function that un-intentionally perform tests without a conditioning set. There is no use case in the toolbox that does not require a conditioning set. Fix typo in docstring. --- idtxl/network_inference.py | 2 +- idtxl/stats.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/idtxl/network_inference.py b/idtxl/network_inference.py index 098e0d69..20a7863e 100755 --- a/idtxl/network_inference.py +++ b/idtxl/network_inference.py @@ -78,7 +78,7 @@ def _check_source_set(self, sources, n_processes): self.target, self.source_set)) def _include_candidates(self, candidate_set, data): - """Inlcude informative candidates into the conditioning set. + """Include informative candidates into the conditioning set. Loop over each candidate in the candidate set and test if it has significant mutual information with the current value, conditional diff --git a/idtxl/stats.py b/idtxl/stats.py index 4c4defcd..900fe2fe 100644 --- a/idtxl/stats.py +++ b/idtxl/stats.py @@ -395,7 +395,7 @@ def omnibus_test(analysis_setup, data): def max_statistic(analysis_setup, data, candidate_set, te_max_candidate, - conditional=None): + conditional): """Perform maximum statistics for one candidate source. Test if a transfer entropy value is significantly bigger than the maximum @@ -420,10 +420,9 @@ def max_statistic(analysis_setup, data, candidate_set, te_max_candidate, list of indices of remaning candidates te_max_candidate : float transfer entropy value to be tested - conditional : numpy array [optional] + conditional : numpy array realisations of conditional, 2D numpy array where array dimensions - represent [realisations x variable dimension] (default=None, no - conditioning performed) + represent [realisations x variable dimension] Returns: bool From bfb3bd1cc5a54faf32e235fe51f55770926169e0 Mon Sep 17 00:00:00 2001 From: Patricia Wollstadt Date: Thu, 20 May 2021 21:10:55 +0200 Subject: [PATCH 4/4] Update references for PID Fixes #67. --- README.md | 5 +++-- README.txt | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 94d17424..6f728c68 100644 --- a/README.md +++ b/README.md @@ -56,8 +56,9 @@ http://www.mis.mpg.de/preprints/2012/preprint2012_25.pdf* + Kraskov estimator: [*Kraskov et al., 2004, Phys Rev E 69, 066138*](https://journals.aps.org/pre/abstract/10.1103/PhysRevE.69.066138) + Nonuniform embedding: [*Faes et al., 2011, Phys Rev E 83, 051112*](https://journals.aps.org/pre/abstract/10.1103/PhysRevE.83.051112) + Faes' compensated transfer entropy: [*Faes et al., 2013, Entropy 15, 198-219*](https://www.mdpi.com/1099-4300/15/1/198) -+ PID: [Williams & Beer, 2010, arXiv:1004.2515 [cs.IT]](http://arxiv.org/abs/1004.2515); - [Makkeh et al., 2020, arXiv:2002.03356 [cs.IT]](https://arxiv.org/abs/2002.03356) ++ PID: [*Williams & Beer, 2010, arXiv:1004.2515 [cs.IT]*](http://arxiv.org/abs/1004.2515); + [*Makkeh et al., 2021, Phys Rev E 103, 032149*](https://doi.org/10.1103/PhysRevE.103.032149); + [*Gutknecht et al., 2020, arXiv:2008.09535 [cs.AI]*](https://arxiv.org/abs/2008.09535) + PID estimators: *[Bertschinger et al., 2014, Entropy, 16(4)](https://www.mdpi.com/1099-4300/16/4/2161); [Makkeh et al., 2017, Entropy, 19(10)](https://www.mdpi.com/1099-4300/19/10/530); [Makkeh et al., 2018, Entropy, 20(271)](https://www.mdpi.com/1099-4300/20/4/271)* diff --git a/README.txt b/README.txt index 1be3fe9e..800b8a5d 100644 --- a/README.txt +++ b/README.txt @@ -51,6 +51,8 @@ http://www.mis.mpg.de/preprints/2012/preprint2012_25.pdf* + Kraskov estimator: *Kraskov et al., 2004, Phys Rev E 69, 066138* + Nonuniform embedding: *Faes et al., 2011, Phys Rev E 83, 051112* + Faes' compensated transfer entropy: *Faes et al., 2013, Entropy 15, 198-219* -+ PID: *Williams & Beer, 2010, arXiv preprint: http://arxiv.org/abs/1004.2515* ++ PID: Williams & Beer, 2010, arXiv:1004.2515 [cs.IT]; + Makkeh et al., 2021, Phys Rev E 103, 032149; + Gutknecht et al., 2020, arXiv:2008.09535 [cs.AI] + PID estimators: *Bertschinger et al., 2014, Entropy, 16(4); Makkeh et al., 2017, Entropy, 19(10), Makkeh et al., 2018, Entropy, 20(271)*