API Reference

This reference is generated from the public namespace of each dit subpackage, so it lists every function and class you can import from it. The narrative pages elsewhere in the documentation explain what the measures mean and show worked examples; this section is the place to look up exact signatures.

Subpackages re-export the contents of their nested modules. For example, dit.multivariate includes the common informations and secret key agreement bounds, dit.pid includes every PID_* measure, and dit.rate_distortion includes the Gray–Wyner tools.

Core

dit

dit is a Python package for information theory on discrete random variables.

dit.example_dists

A selection of generic distributions which could be useful.

dit.symbolic

Symbolic (sympy-backed) distributions and helpers.

dit.math

Mathematical tools for dit.

dit.utils

Module providing miscellaneous functionality.

Measures

dit.shannon

The basic forms of Shannon's information measures.

dit.multivariate

Multivariate measures of information.

dit.divergences

Divergences, measuring the distance between distributions.

dit.other

Esoteric measures of information, typically fairly divorced from Shannon's measures.

Decompositions and Profiles

dit.pid

Import all the PIDs.

dit.profiles

This module contains various information "profiles", decomposing the total information into the information contained at different scales.

dit.visualization

Visualizations of multivariate distributions.

Channels, Coding, and Rate-Distortion

dit.example_channels

A catalog of canonical discrete memoryless channels.

dit.channelorder

Channel comparison: orderings and deficiencies.

dit.coding

Coding: building source and channel codes.

dit.rate_distortion

Various implementations of rate-distortion theory.

Estimation and Optimization

dit.inference

Module for basic inference tools.

dit.algorithms

Various algorithms related to manipulating or measuring properties of distributions.