SkillAgentSearch skills...

Infomeasure

Python package for calculating various information measures, including entropy, mutual information, transfer entropy, and more, with support for both discrete and continuous variables.

Install / Use

/learn @cbueth/Infomeasure

README

<div style="text-align: center; max-width: 700px; margin: 0 auto;"> <a href="https://infomeasure.readthedocs.io/"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/cbueth/infomeasure/refs/heads/main/docs/_static/im_logo_transparent.png"> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cbueth/infomeasure/refs/heads/main/docs/_static/im_logo_transparent_dark.png"> <img src="https://raw.githubusercontent.com/cbueth/infomeasure/refs/heads/main/docs/_static/im_logo_transparent.png" style="max-width: 100%; height: auto;" alt="infomeasure logo"> </picture> </a> </div> <div align="center">

<a href="">Documentation</a> <a href="">PyPI Version</a> <a href="">Python Version</a> <a href="">Anaconda Version</a> <a href="">PyPI Downloads</a>

</div> <div align="center">

<a href="">arXiv</a> <a href="">DOI</a> <a href="">Ruff</a> <a href="">Contributor Covenant</a>

</div> <div align="center">

<a href="">pipeline status</a> <a href="">coverage report</a>

</div>

Continuous and discrete entropy and information measures using different estimation techniques.


For details on how to use this package, see the Guide or the Documentation.

Setup

This package can be installed from PyPI using pip:

pip install infomeasure

This will automatically install all the necessary dependencies as specified in the pyproject.toml file. It is recommended to use a virtual environment, e.g. using conda, mamba or micromamba (they can be used interchangeably). infomeasure can be installed from the conda-forge channel.

conda create -n im_env -c conda-forge python
conda activate im_env
conda install -c conda-forge infomeasure

Development Setup

For development, we recommend using micromamba to create a virtual environment (conda or mamba also work) and installing the package in editable mode. After cloning the repository, navigate to the root folder and create the environment with the desired python version and the dependencies.

micromamba create -n im_env -c conda-forge python
micromamba activate im_env

To let micromamba handle the dependencies, use the requirements files

micromamba install -f requirements/build_requirements.txt \
  -f requirements/linter_requirements.txt \
  -f requirements/test_requirements.txt \
  -f requirements/doc_requirements.txt
pip install --no-build-isolation --no-deps -e .

Alternatively, if you prefer to use pip, installing the package in editable mode will also install the development dependencies.

pip install -e ".[all]"

Now, the package can be imported and used in the python environment, from anywhere on the system if the environment is activated. For new changes, the repository only needs to be updated, but the package does not need to be reinstalled.

Set up Jupyter kernel

If you want to use infomeasure with its environment im_env in Jupyter, run:

pip install --user ipykernel
python -m ipykernel install --user --name=im_env

This allows you to run Jupyter with the kernel im_env (Kernel > Change Kernel > im_env)

Acknowledgments

This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 851255). This work was partially supported by the María de Maeztu project CEX2021-001164-M funded by the MICIU/AEI/10.13039/501100011033 and FEDER, EU.

Related Skills

View on GitHub
GitHub Stars63
CategoryData
Updated5h ago
Forks11

Languages

Python

Security Score

100/100

Audited on Mar 25, 2026

No findings