Skip to main content

ΩID

PyPI version License Ask DeepWiki

ΩID is a Python package for calculating the integrated information decomposition (ΦID) of time series data. It is designed for high-performance computing, with optional GPU acceleration via CuPy.

Features

  • Backend Agnostic: Seamlessly switch between CPU (NumPy) and GPU (CuPy) for computation.
  • High Performance: Vectorized operations and Numba-optimized functions for significant speedups.
  • Numerical Integrity: Results are numerically consistent with the original phyid implementation within single/double precision tolerances.
  • Multivariate Decomposition: Supports decomposition of systems with multiple source and target variables using the Doublet Lattice approximation.

Installation

ΩID is available on PyPI. You can install it with pip or uv pip.

Standard Installation (CPU only)

pip install omegaid

With GPU support

To install ΩID with GPU support, you need to have a CUDA-enabled GPU and the CUDA toolkit installed. Choose the command that matches your CUDA version.

For CUDA 12.x:

pip install "omegaid[cuda-12x]"

For CUDA 11.x:

pip install "omegaid[cuda-11x]"

Usage

Selecting the Backend

You can select the computation backend by setting the OMEGAID_BACKEND environment variable before running your Python script.

  • For NumPy (default):

    export OMEGAID_BACKEND=numpy
    
  • For CuPy:

    export OMEGAID_BACKEND=cupy
    

If the variable is not set, OmegaID will default to using NumPy.

Example

Here is a simple example of how to use omegaid to calculate the Phi-ID decomposition for a multivariate system.

import numpy as np
from omegaid.core.decomposition import calc_phiid_multivariate
from omegaid.utils.backend import set_backend

# For programmatic control, you can also use set_backend
# set_backend('cupy') 

# Generate some random time series data (4 sources, 2 targets)
n_sources = 4
n_targets = 2
n_samples = 10000
tau = 1
sources = np.random.randn(n_sources, n_samples)
targets = np.random.randn(n_targets, n_samples)

# Calculate Phi-ID using the Doublet Lattice approximation
atoms_res, _ = calc_phiid_multivariate(sources, targets, tau)

# Print a synergistic atom, e.g., between source 0 and target 1
print("Synergy (s0, t1):", atoms_res.get((0, 1), "N/A"))

Performance

The package has been benchmarked for various systems. The results below show the performance against the original phyid (where applicable) and between CPU/GPU backends.

Test Case Implementation Time (s) Speedup
2x2 CCS (100k) omegaid_2x2_cpu 0.1390 1.18x
omegaid_2x2_gpu 0.0947 1.47x
phyid 0.1640 1.00x
2x2 MMI (100k) omegaid_2x2_cpu 0.1168 1.07x
omegaid_2x2_gpu 0.4511 0.26x
phyid 0.1247 1.00x
4x2 CCS (100k) omegaid_4x2_cpu 0.3962 1.00x
omegaid_4x2_gpu 0.1892 2.09x
4x2 MMI (100k) omegaid_4x2_cpu 0.4043 1.00x
omegaid_4x2_gpu 0.2558 1.58x
4x4 MMI (10k) omegaid_4x4_cpu 1.8373 1.00x
omegaid_4x4_gpu 0.8201 2.24x

The results demonstrate that for more complex multivariate systems (e.g., 4x2 and 4x4), the CuPy backend provides a consistent and significant performance advantage due to the fully vectorized implementation. For simpler 2x2 systems, the Numba-optimized NumPy backend remains highly competitive.

License

This project is licensed under the BSD 3-Clause License.

Metadata

Release files for omegaid 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for omegaid 0.2.5
File Size Uploaded
omegaid-0.2.5.tar.gz 36.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for omegaid 0.2.5
File Interpreter ABI Platform
omegaid-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 47.5 kB

Release files / omegaid-0.2.5.tar.gz

Download URL omegaid-0.2.5.tar.gz
Size 36.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8e8179f3f1d3a0bd79aec65342c6cc9c7375114fa89415e4c39be9835a1e5c7b
BLAKE2b-256 checksum
How to use checksums
34dfe5512e4da6cb0b61c404c9e8a72a154c7489f6ca89a814a5224f74b36e22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 30, 2025.

Transparency log

Release files / omegaid-0.2.5-py3-none-any.whl

Download URL omegaid-0.2.5-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8077bd698f53aa881c6728bc56d6d20527c0fcb51fd9e4d1a9ed3b052cbee632
BLAKE2b-256 checksum
How to use checksums
96deba52d0979f96b253b72d3dbeffd4993cb24344fe0614b0415705b453f28e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 30, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.5 This release

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page