sidpy is a Python package for estimating quantities from specific information dynamics such as specific entropy rate and specific transfer entropy from data, as well as local information dynamics via the Java Information Dynamics Toolbox (JIDT). sidpy also incorporates model selection routines to determine the appropriate model order for scalar and input-output time series.
pip install git+https://github.com/ddarmon/sidpy
If you run into an error message like the following after running import sidpy
:
File /path/site-packages/pyflann/bindings/flann_ctypes.py:173
171 flannlib = load_flann_library()
172 if flannlib == None:
--> 173 raise ImportError('Cannot load dynamic library. Did you compile FLANN?')
176 class FlannLib:
177 pass
ImportError: Cannot load dynamic library. Did you compile FLANN?
this is likely because the dynamic library libflann.dylib
is not in the pyflann/bindings
folder.
To fix this:
-
Install
flann
brew install flann
-
Find Installation Location Find where the
flann
library is installed by running:brew info flann
Go to the location provided by
brew
. On my current installation and version offlann
, it is:cd /opt/homebrew/Cellar/flann/1.9.2_1
-
Copy the
libflann.v.v.v.dylib
File Finally, copy thelibflann.v.v.v.dylib
file tosite-packages/pyflann
aslibflann.dylib
using:mkdir -p /path/site-packages/pyflann/bindings/lib/darwin/ cp /opt/homebrew/Cellar/flann/1.9.2_1/lib/libflann.1.9.2.dylib /path/site-packages/pyflann/bindings/lib/darwin/libflann.dylib
Make sure to replace /path/
with the actual path where your site-packages/pyflann
is located. Also, the version number in the libflann.v.v.v.dylib
should match the installed version of flann
. In this example, it's 1.9.2
.
If nlopt
fails to install using pip
, try conda
:
conda install nlopt
See the Jupyter notebooks in example-notebooks for a demonstration of the functionality of sidpy.
If you use sidpy in a scientific publication, please cite this GitHub repository.