Skip to content

Commit 0a53795

Browse files
authored
Merge pull request #67 from DynamicsAndNeuralSystems/jmoo2880-JIDT-upgrade
Infotheory SPI reproducibility fix
2 parents e2fe31d + be68799 commit 0a53795

File tree

13 files changed

+66
-41
lines changed

13 files changed

+66
-41
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pyspi"
7-
version = "1.0.2"
7+
version = "1.0.3"
88
authors = [
99
{ name ="Oliver M. Cliff", email="[email protected]"},
1010
]

pyspi/lib/jidt/build.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</description>
66

77
<!-- set global properties for this build -->
8-
<property name="version" value="1.5"/>
8+
<property name="version" value="1.6.1"/>
99
<property name="mainfilename" value="infodynamics"/>
1010
<property name="jarplainname" value="${mainfilename}.jar" />
1111
<property name="jarversiondistnamezip" value="${mainfilename}-jar-${version}.zip" />
@@ -43,17 +43,17 @@
4343

4444
<!-- Compile the java toolkit -->
4545
<target name="compile" depends="init" description="compile the source">
46-
<!-- Compile to Java 6 to provide compatibility for users with older JREs.
46+
<!-- Compile to Java 7 to provide compatibility for users with older JREs.
4747
Caveat: The flags here only check the language compatibility, but
48-
may still use newer libraries which may cause issues for users with JDK 6.
49-
Indeed, one gets the warning: "bootstrap class path not set in conjunction with -source 1.6"
48+
may still use newer libraries which may cause issues for users with JDK 7.
49+
Indeed, one gets the warning: "bootstrap class path not set in conjunction with -source 1.7"
5050
To fix this, one would use the bootstrap classpath to point our JDK to an rt.jar
51-
for Java 6.
52-
At this stage, I'm sure I'm not using new library calls from Java 7/8, so we can
53-
ignore the warning, and I don't want to bother installing Java 7 just to compile
51+
for Java 7.
52+
At this stage, I'm sure I'm not using new library calls from Java 8+, so we can
53+
ignore the warning, and I don't want to bother installing newer Java just to compile
5454
like this. I'll endeavour not to use JDK 8 libraries so as not to cause
5555
any issues here ... -->
56-
<javac srcdir="${src}" destdir="${bin}" includeAntRuntime="false" target="1.6" source="1.6" encoding="UTF8">
56+
<javac srcdir="${src}" destdir="${bin}" includeAntRuntime="false" target="1.7" source="1.7" encoding="UTF8">
5757
<classpath refid="apache-classpath"/>
5858
</javac>
5959

@@ -116,12 +116,12 @@
116116
<target name="javadocs" depends="compile" description="Make the javadocs for the toolkit">
117117
<delete dir="${javadocsdir}"/>
118118
<javadoc destdir="${javadocsdir}">
119-
<fileset dir="${src}">
120-
<include name="**/*.java"/>
121-
<exclude name="infodynamics/demos/**/*.java"/>
122-
<exclude name="**/commonsmath3/*.java"/>
123-
<exclude name="**/commonsmath3/**/*.java"/>
124-
</fileset>
119+
<packageset dir="${src}">
120+
<include name="**"/>
121+
<exclude name="infodynamics/demos/**"/>
122+
<exclude name="**/commonsmath3/*"/>
123+
<exclude name="**/commonsmath3/**"/>
124+
</packageset>
125125
</javadoc>
126126
<!-- Change some of the style in the javadocs css for our lists: -->
127127
<concat destfile="${javadocsdir}/stylesheet.css" append="true">
@@ -177,7 +177,7 @@
177177
<!-- Compile and jar the toolkit with debug symbols -->
178178
<target name="debug" depends="init" description="compile and jar with debug symbols">
179179
<echo message="Compiling for debug"/>
180-
<javac srcdir="${src}" destdir="${bin}" includeAntRuntime="false" target="1.6" source="1.6" debug="true">
180+
<javac srcdir="${src}" destdir="${bin}" includeAntRuntime="false" target="1.7" source="1.7" debug="true">
181181
<classpath refid="apache-classpath"/>
182182
</javac>
183183

pyspi/lib/jidt/infodynamics.jar

44.3 KB
Binary file not shown.

pyspi/lib/jidt/license-gplv3.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,18 @@ makes it unnecessary.
179179
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180180

181181
No covered work shall be deemed part of an effective technological
182-
statistic under any applicable law fulfilling obligations under article
182+
measure under any applicable law fulfilling obligations under article
183183
11 of the WIPO copyright treaty adopted on 20 December 1996, or
184184
similar laws prohibiting or restricting circumvention of such
185-
statistics.
185+
measures.
186186

187187
When you convey a covered work, you waive any legal power to forbid
188-
circumvention of technological statistics to the extent such circumvention
188+
circumvention of technological measures to the extent such circumvention
189189
is effected by exercising rights under this License with respect to
190190
the covered work, and you disclaim any intention to limit operation or
191191
modification of the work as a means of enforcing, against the work's
192192
users, your or third parties' legal rights to forbid circumvention of
193-
technological statistics.
193+
technological measures.
194194

195195
4. Conveying Verbatim Copies.
196196

pyspi/lib/jidt/readme.txt

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
Java Information Dynamics Toolkit (JIDT)
22
Copyright (C) 2012-2014 Joseph T. Lizier
33
Copyright (C) 2014-2016 Joseph T. Lizier and Ipek Özdemir
4-
Copyright (C) 2017- Joseph T. Lizier, Ipek Özdemir and Pedro Mediano
4+
Copyright (C) 2016-2019 Joseph T. Lizier, Ipek Özdemir and Pedro Mediano
5+
Copyright (C) 2019-2022 Joseph T. Lizier, Ipek Özdemir, Pedro Mediano, Emanuele Crosato, Sooraj Sekhar and Oscar Huaigu Xu
6+
Copyright (C) 2022- Joseph T. Lizier, Ipek Özdemir, Pedro Mediano, Emanuele Crosato, Sooraj Sekhar, Oscar Huaigu Xu and David Shorten
57

6-
Version 1.5 (see release notes below)
8+
Version 1.6.1 (see release notes below)
79

8-
JIDT provides a standalone, open source code Java implementation (usable in Matlab, Octave and Python) of information-theoretic statistics of distributed computation in complex systems: i.e. information storage, transfer and modification.
10+
JIDT provides a standalone, open source code Java implementation (usable in Matlab, Octave and Python) of information-theoretic measures of distributed computation in complex systems: i.e. information storage, transfer and modification.
911

1012
This includes implementations for:
11-
- both discrete and continuous-valued variables, principally for the statistics transfer entropy, mutual information and active information storage;
13+
- both discrete and continuous-valued variables, principally for the measures transfer entropy, mutual information and active information storage;
1214
- using various types of estimators (e.g. Kraskov-Stögbauer-Grassberger estimators, kernel estimation, linear-Gaussian).
1315

1416
=============
@@ -60,7 +62,7 @@ Documentation
6062

6163
A research paper describing the toolkit is included in the top level directory -- "InfoDynamicsToolkit.pdf".
6264

63-
A tutorial, providing background to the information-theoretic statistics, various estimators, and then to the JIDT toolkit itself is included in the tutorial folder (see "JIDT-TutorialSlides.pdf" for the tutorial slides, and "README-TutorialAndExercise.pdf" for further description of the tutorial exercises).
65+
A tutorial, providing background to the information-theoretic measures, various estimators, and then to the JIDT toolkit itself is included in the tutorial folder (see "JIDT-TutorialSlides.pdf" for the tutorial slides, and "README-TutorialAndExercise.pdf" for further description of the tutorial exercises).
6466

6567
Javadocs for the toolkit are included in the full distribution at javadocs.
6668
They can also be generated using "ant javadocs" (useful if you are on a git clone).
@@ -78,7 +80,7 @@ You can also join our email discussion group jidt-discuss at http://groups.googl
7880

7981
Several sets of demonstration code are distributed with the toolkit:
8082

81-
a. demos/AutoAnalyser -- a GUI tool to compute the information-theoretic statistics on a chosen data set with the toolkit, and also automatically generate code in Java, Python and Matlab to show how to do this calculation with the toolkit. See description at https://github.com/jlizier/jidt/wiki/AutoAnalyser
83+
a. demos/AutoAnalyser -- a GUI tool to compute the information-theoretic measures on a chosen data set with the toolkit, and also automatically generate code in Java, Python and Matlab to show how to do this calculation with the toolkit. See description at https://github.com/jlizier/jidt/wiki/AutoAnalyser
8284

8385
b. demos/java -- basic examples on easily using the Java toolkit -- run these from the shell scripts in this directory -- see description at https://github.com/jlizier/jidt/wiki/SimpleJavaExamples
8486

@@ -96,7 +98,7 @@ Several sets of demonstration code are distributed with the toolkit:
9698

9799
d. demos/octave/CellularAutomata -- using the Java toolkit to plot local information dynamics profiles in cellular automata; the toolkit is run under Octave or Matlab -- see description at https://github.com/jlizier/jidt/wiki/CellularAutomataDemos
98100

99-
e. demos/octave/SchreiberTransferEntropyExamples -- recreates the transfer entropy examples in Schreiber's original paper presenting this statistic; shows the correct parameter settings to reproduce these results -- see description at https://github.com/jlizier/jidt/wiki/SchreiberTeDemos
101+
e. demos/octave/SchreiberTransferEntropyExamples -- recreates the transfer entropy examples in Schreiber's original paper presenting this measure; shows the correct parameter settings to reproduce these results -- see description at https://github.com/jlizier/jidt/wiki/SchreiberTeDemos
100102

101103
f. demos/octave/DetectingInteractionLags -- demonstration of using the transfer entropy with source-destination lags; the demo is run under Octave or Matlab -- see description at https://github.com/jlizier/jidt/wiki/DetectingInteractionLags
102104

@@ -134,6 +136,23 @@ Notices for this software are found in the notices/JAMA directory.
134136
Release notes
135137
===============
136138

139+
v1.6.1 22/8/2023
140+
-------------
141+
(after 909 commits recorded by github, repository as at https://github.com/jlizier/jidt/tree/90baf68ee7332e15030447b44d262a0fc54773f6 save for this file update)
142+
Minor updates to supporting use in Python, including virtual environments;
143+
Minor tweaks to fish schooling examples (mostly comments)
144+
145+
v1.6 5/9/2022
146+
-------------
147+
(after 889 commits recorded by github, repository as at https://github.com/jlizier/jidt/tree/d750a737bea2a8b1f33b7cd0ad167ec999d907ef save for this file update)
148+
Adding Flocking/Schooling/Swarming demo;
149+
Included Pedro's code on IIT and O-/S-Information measures;
150+
Spiking TE estimator added from David;
151+
Fixed up AutoAnalyser to work well for Python3 and numpy;
152+
Links to lecture videos included in the beta wiki for the course;
153+
Added rudimentary effective network inference (simplified version of the IDTxl full algorithm) in demos/octave/EffectiveNetworkInference;
154+
155+
137156
v1.5 26/11/2018
138157
---------------
139158
(after 753 commits recorded by github, repository as at https://github.com/jlizier/jidt/tree/603445651cc0bf155a42c9ba336141bc7f29bccd save for this file update)
@@ -215,7 +234,7 @@ Javadocs made ready for release;
215234
Switched source->destination arguments for discrete TE calculators to be with source first in line with continuous calculators;
216235
Renamed all discrete calculators to have Discrete suffix -- TE and conditional TE calculators also renamed to remove "Apparent" prefix and change "Complete" to "Conditional";
217236
Kraskov estimators now using 4 nearest neighbours by default;
218-
Unit test for Gaussian TE against ChaLearn Granger causality statisticment;
237+
Unit test for Gaussian TE against ChaLearn Granger causality measurement;
219238
Added Schreiber TE demos; Interregional transfer demos; documentation for Interaction lag demos; added examples 7 and 8 to Simple Java demos;
220239
Added property to add noise to data for Kraskov MI;
221240
Added derivation of Apache Commons Math code for chi square distribution, and included relevant notices in our release;
@@ -263,5 +282,5 @@ First distribution
263282

264283
=============
265284

266-
Joseph T. Lizier, 25/11/2018
285+
Joseph T. Lizier, 22/08/2023
267286

pyspi/lib/jidt/version-1.5.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

pyspi/lib/jidt/version-1.6.1.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Java Information Dynamics Toolkit (JIDT)
2+
Copyright (C) 2012-2014 Joseph T. Lizier
3+
Copyright (C) 2014-2016 Joseph T. Lizier and Ipek Özdemir
4+
Copyright (C) 2016-2019 Joseph T. Lizier, Ipek Özdemir and Pedro Mediano
5+
Copyright (C) 2019-2022 Joseph T. Lizier, Ipek Özdemir, Pedro Mediano, Emanuele Crosato, Sooraj Sekhar and Oscar Huaigu Xu
6+
Copyright (C) 2022- Joseph T. Lizier, Ipek Özdemir, Pedro Mediano, Emanuele Crosato, Sooraj Sekhar, Oscar Huaigu Xu and David Shorten
7+
8+
Version 1.6.1
9+
10+
22/08/2023
11+

pyspi/statistics/causal.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def _from_cache(self, data):
125125
target=targname,
126126
libSizes=lib_sizes,
127127
sample=100,
128+
seed=42,
128129
)
129130
ccmf[_i, _j] = ccm_df.iloc[:, 1].values[: (nlibs + 1)]
130131
ccmf[_j, _i] = ccm_df.iloc[:, 2].values[: (nlibs + 1)]

pyspi/statistics/infotheory.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class JIDTBase(Unsigned):
3838
_TAU_SEARCH_MAX_PROP_NAME = "AUTO_EMBED_TAU_SEARCH_MAX"
3939
_BIAS_CORRECTION = "BIAS_CORRECTION"
4040
_NORMALISE = "NORMALISE"
41+
_SEED = "NOISE_SEED"
4142

4243
_base_class = jp.JPackage("infodynamics.measures.continuous")
4344

@@ -104,6 +105,7 @@ def _setup(self, calc):
104105
calc.setProperty(self._NNK_PROP_NAME, str(self._prop_k))
105106

106107
calc.setProperty(self._BIAS_CORRECTION, "false")
108+
calc.setProperty(self._SEED, "42")
107109

108110
return calc
109111

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
'data/standard_normal.npy',
6262
'data/cml7.npy']},
6363
include_package_data=True,
64-
version='1.0.2',
64+
version='1.0.3',
6565
description='Library for pairwise analysis of time series data.',
6666
author='Oliver M. Cliff',
6767
author_email='[email protected]',

0 commit comments

Comments
 (0)