Skip to content
A toolbox for integrated information theory.
Python Other
  1. Python 99.8%
  2. Other 0.2%
Branch: develop
Clone or download

Latest commit

Latest commit 70e4cf6 Jun 16, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmarks Drop support for Python 3.5 Feb 20, 2020
docs docs: Use latest MathJax Jun 16, 2020
paper Add PLOS Computational Biology paper to repo Aug 14, 2018
profiling Format code with black and sort imports Feb 20, 2020
pyphi conf.py: Fix typo Apr 13, 2020
test Format code with black and sort imports Feb 20, 2020
.coveragerc Disable coverage for parallel code Sep 16, 2017
.flake8 .flake8: More chill Jun 16, 2019
.gitignore .gitignore: Clean up Jun 14, 2019
.isort.cfg .isort.cfg: Update isort settings Jun 16, 2019
.pre-commit-config.yaml Add `.pre-commit-config.yaml` Jun 18, 2019
.pylintrc .pylintrc: Ignore 'bad-continuation' Jun 16, 2019
.travis.yml Drop support for Python 3.5 Feb 20, 2020
CACHING.rst Move caching section in README to separate file Mar 23, 2017
CHANGELOG.md Update CHANGELOG Jul 23, 2019
INSTALLATION.rst INSTALLATION: Clarify Apr 27, 2020
LICENSE.md Add GNUv3 license Apr 7, 2014
MANIFEST.in Convert README to markdown May 30, 2018
Makefile Makefile: Add `clean` target Jun 16, 2019
README.md README.md: Fix typo Feb 7, 2020
conftest.py Format code with black and sort imports Feb 20, 2020
dev_requirements.txt dev_requirements.txt: Add black Feb 20, 2020
pyphi_config.yml Add welcome message May 14, 2019
pyproject.toml Add `pyproject.toml` Feb 20, 2020
pytest.ini pytest.ini: Register custom marks Jun 21, 2019
redis.conf Clean up `redis.conf` Feb 7, 2016
requirements.txt Revert "Tweak requirements order" Mar 8, 2018
setup.cfg Add setup.cfg Dec 12, 2014
setup.py Format code with black and sort imports Feb 20, 2020
test_requirements.txt Use pytest.lazy_fixture() to parametrize fixtures Jun 17, 2019
tox.ini tox.ini: Update python versions Feb 7, 2020

README.md

PyPhi logo

Documentation badge Travis build badge Coveralls.io badge License badge Python versions badge

PyPhi is a Python library for computing integrated information (𝚽), and the associated quantities and objects.

If you use this code, please cite the paper:


Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G. (2018) PyPhi: A toolbox for integrated information theory. PLOS Computational Biology 14(7): e1006343. https://doi.org/10.1371/journal.pcbi.1006343


An illustrated tutorial on how Φ is calculated is available as a supplement to the paper.

Usage, Examples, and API documentation

Installation

Set up a Python 3 virtual environment and install with

pip install pyphi

To install the latest development version, which is a work in progress and may have bugs, run:

pip install "git+https://github.com/wmayner/pyphi@develop#egg=pyphi"

Note: this software is only supported on Linux and macOS. However, if you use Windows, you can run it by using the Anaconda Python distribution and installing PyPhi with conda:

conda install -c wmayner pyphi

Detailed installation guide for Mac OS X

See here.

User group

For discussion about the software or integrated information theory in general, you can join the pyphi-users group.

For technical issues with PyPhi or feature requests, please use the issues page.

Contributing

To help develop PyPhi, fork the project on GitHub and install the requirements with

pip install -r requirements.txt

The Makefile defines some tasks to help with development:

make test

runs the unit tests every time you change the source code.

make benchmark

runs performance benchmarks.

make docs

builds the HTML documentation.

Developing on Linux

Make sure you install the C headers for Python 3, SciPy, and NumPy before installing the requirements:

sudo apt-get install python3-dev python3-scipy python3-numpy

Developing on Windows

If you're just looking for an editable install, pip may work better than the conda develop utility included in the conda-build package. When using pip on Windows, the build of pyemd may fail. The simplest solution to this is to obtain pyemd through conda.

conda create -n pyphi_dev
conda activate pyphi_dev
conda install -c wmayner pyemd
cd path/to/local/editable/copy/of/pyphi
pip install -e .

Unfortunately, pip isn't great at managing the DLLs that some packages (especially scipy) rely on. If you have missing DLL errors, try reinstalling the offending package (here, scipy) with conda.

conda activate pyphi_dev
pip uninstall scipy
conda install scipy

Credit

Please cite these papers if you use this code:

Mayner WGP, Marshall W, Albantakis L, Findlay G, Marchman R, Tononi G. (2018) PyPhi: A toolbox for integrated information theory. PLOS Computational Biology 14(7): e1006343. https://doi.org/10.1371/journal.pcbi.1006343

@article{mayner2018pyphi,
  title={PyPhi: A toolbox for integrated information theory},
  author={Mayner, William GP and Marshall, William and Albantakis, Larissa and Findlay, Graham and Marchman, Robert and Tononi, Giulio},
  journal={PLoS Computational Biology},
  volume={14},
  number={7},
  pages={e1006343},
  year={2018},
  publisher={Public Library of Science},
  doi={10.1371/journal.pcbi.1006343},
  url={https://doi.org/10.1371/journal.pcbi.1006343}
}

Albantakis L, Oizumi M, Tononi G (2014). From the Phenomenology to the Mechanisms of Consciousness: Integrated Information Theory 3.0. PLoS Comput Biol 10(5): e1003588. doi: 10.1371/journal.pcbi.1003588.

@article{iit3,
    title={From the Phenomenology to the Mechanisms of Consciousness:
    author={Albantakis, Larissa AND Oizumi, Masafumi AND Tononi, Giulio},
    Integrated Information Theory 3.0},
    journal={PLoS Comput Biol},
    publisher={Public Library of Science},
    year={2014},
    month={05},
    volume={10},
    pages={e1003588},
    number={5},
    doi={10.1371/journal.pcbi.1003588},
    url={http://dx.doi.org/10.1371%2Fjournal.pcbi.1003588}
}

This project is inspired by a previous project written in Matlab by L. Albantakis, M. Oizumi, A. Hashmi, A. Nere, U. Olcese, P. Rana, and B. Shababo.

Correspondence regarding this code and the PyPhi paper should be directed to Will Mayner, at mayner@wisc.edu. Correspondence regarding the Matlab code and the IIT 3.0 paper should be directed to Larissa Albantakis, PhD, at albantakis@wisc.edu.

You can’t perform that action at this time.