infomeasure

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

https://github.com/cbueth/infomeasure

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.7%) to scientific vocabulary

Keywords

complex-networks conditional-probability data-science entropy entropy-measures information-theory machine-learning mathematical-modelling mutual-information numpy physics research statistical-analysis transfer-entropy
Last synced: 6 months ago · JSON representation ·

Repository

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

Basic Info
Statistics
  • Stars: 25
  • Watchers: 1
  • Forks: 4
  • Open Issues: 0
  • Releases: 3
Topics
complex-networks conditional-probability data-science entropy entropy-measures information-theory machine-learning mathematical-modelling mutual-information numpy physics research statistical-analysis transfer-entropy
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

infomeasure logo
[![Documentation](https://readthedocs.org/projects/infomeasure/badge/)](https://infomeasure.readthedocs.io/) [![PyPI Version](https://badge.fury.io/py/infomeasure.svg)](https://pypi.org/project/infomeasure/) [![Python Version](https://img.shields.io/pypi/pyversions/infomeasure)](https://pypi.org/project/infomeasure/) [![Anaconda Version](https://anaconda.org/conda-forge/infomeasure/badges/version.svg)](https://anaconda.org/conda-forge/infomeasure) [![PyPI Downloads](https://static.pepy.tech/badge/infomeasure)](https://pepy.tech/projects/infomeasure)
[![arXiv](https://img.shields.io/badge/arXiv-2505.14696-b31b1b.svg)](https://arxiv.org/abs/2505.14696) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.15241810.svg)](https://doi.org/10.5281/zenodo.15241810) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-1.2-4baaaa.svg)](CODE_OF_CONDUCT.md)
[![pipeline status](https://gitlab.ifisc.uib-csic.es/carlson/infomeasure/badges/main/pipeline.svg)](https://gitlab.ifisc.uib-csic.es/carlson/infomeasure/-/commits/main) [![coverage report](https://gitlab.ifisc.uib-csic.es/carlson/infomeasure/badges/main/coverage.svg)](https://gitlab.ifisc.uib-csic.es/carlson/infomeasure/-/jobs)

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:

bash 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.

bash 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.

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

To let micromamba handle the dependencies, use the requirements files

bash 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.

bash 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:

bash 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.

Owner

  • Name: Carlson Büth
  • Login: cbueth
  • Kind: user
  • Location: Palma de Mallorca, Spain

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this source code, please cite it as below."
title: infomeasure
type: software
authors:
    - family-names: "Büth"
      given-names: "Carlson Moses"
      orcid: "https://orcid.org/0000-0003-2298-8438"
    - family-names: "Acharya"
      given-names: "Kishor"
      orcid: "https://orcid.org/0000-0003-3542-6119"
    - family-names: "Zanin"
      given-names: "Massimiliano"
      orcid: "https://orcid.org/0000-0002-5839-0393"
repository-code: 'https://github.com/cbueth/infomeasure/'
url: 'https://infomeasure.readthedocs.io/'
keywords:
    - entropy
    - mutual information
    - transfer entropy
    - information theory
    - information measures
    - conditional probability
license: AGPL-3.0-or-later
version: 0.5.0
doi: 10.5281/zenodo.15241810
date-released: 2025-07-02

preferred-citation:
  type: article
  authors:
    - family-names: "Büth"
      given-names: "Carlson Moses"
      orcid: "https://orcid.org/0000-0003-2298-8438"
    - family-names: "Acharya"
      given-names: "Kishor"
      orcid: "https://orcid.org/0000-0003-3542-6119"
    - family-names: "Zanin"
      given-names: "Massimiliano"
      orcid: "https://orcid.org/0000-0002-5839-0393"
  doi: "10.1038/s41598-025-14053-5"
  journal: "Scientific Reports"
  month: 8
  start: 29323
  end: 29323
  title: "infomeasure: a comprehensive Python package for information theory measures and estimators"
  issue: 1
  volume: 15
  year: 2025
  abstract: "Information theory, i.e. the mathematical analysis of information and of its processing, has become a tenet of modern science; yet, its use in real-world studies is usually hindered by its computational complexity, the lack of coherent software frameworks, and, as a consequence, low reproducibility. We here introduce infomeasure, an open-source Python package designed to provide robust tools for calculating a wide variety of information-theoretic measures, including entropies, mutual information, transfer entropy and divergences. It is designed for both discrete and continuous variables; implements state-of-the-art estimation techniques; and allows the calculation of local measure values, p-values and t-scores. By unifying these approaches under one consistent framework, infomeasure aims to mitigate common pitfalls, ensure reproducibility, and simplify the practical implementation of information-theoretic analyses. In this contribution, we explore the motivation and features of infomeasure; its validation, using known analytical solutions; and exemplify its utility in a case study involving the analysis of human brain time series."

GitHub Events

Total
  • Create event: 4
  • Release event: 2
  • Issues event: 1
  • Watch event: 21
  • Delete event: 2
  • Push event: 23
  • Public event: 1
  • Fork event: 1
Last Year
  • Create event: 4
  • Release event: 2
  • Issues event: 1
  • Watch event: 21
  • Delete event: 2
  • Push event: 23
  • Public event: 1
  • Fork event: 1

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 231
  • Total Committers: 2
  • Avg Commits per committer: 115.5
  • Development Distribution Score (DDS): 0.052
Past Year
  • Commits: 231
  • Committers: 2
  • Avg Commits per committer: 115.5
  • Development Distribution Score (DDS): 0.052
Top Committers
Name Email Commits
Carlson Büth c****t@c****e 219
ACHARYAkishor 5****r 12
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 0
  • Average time to close issues: 10 months
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cbueth (1)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 278 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: infomeasure

Comprehensive collection of information measures.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 278 Last month
Rankings
Dependent packages count: 9.3%
Average: 30.8%
Dependent repos count: 52.3%
Maintainers (1)
Last synced: 6 months ago

Dependencies

pyproject.toml pypi
  • numpy *
  • scipy *
  • sparse >0.10.0
requirements/all_requirements.txt pypi
requirements/build_requirements.txt pypi
  • numpy *
  • scipy *
  • sparse >0.10.0
requirements/doc_requirements.txt pypi
  • graphviz *
  • matplotlib *
  • myst-nb *
  • numpydoc *
  • sphinx *
  • sphinx-automodapi *
  • sphinx-book-theme *
  • sphinxcontrib-bibtex *
requirements/linter_requirements.txt pypi
  • pre-commit *
  • ruff *
requirements/packaging_requirements.txt pypi
  • python-build *
  • twine *
requirements/test_requirements.txt pypi
  • coverage * test
  • pytest * test
  • pytest-cov * test