New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rdot

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdot

Rate distortion optimization tools

pipPyPI
Version
0.0.28
Maintainers
1

Rate Distortion Optimization Tools

test

Introduction

RDOT (Rate Distortion Optimization Tools) is a software library that aims to provide efficient, unified tools for numerically computing rate distortion functions from data.

For low cardinalities, the solutions to rate distortion (Shannon, 1959), information bottleneck (IB) (Tishby et al., 1999) and related objectives are feasible to solve with Blahut-Arimoto (BA) style algorithms. This library unifies several different variants on the rate distortion objective and provides solvers using BA and reverse deterministic annealing. Implementation is inspired by the libraries embo and dit. This library was created to overcome two shortcomings of these existing libraries:

  • embo is a fast implementation of generalized IB, but has no support for getting solution encoders, or using deterministic annealing, which is useful for preserving some structure between nearby optima.

  • dit is a more general library supporting discrete information theory but (anecdotally) it has been found to be slow and its build and tests are not always passing. In contrast, rdot is a fast and focused implementation of rate-distortion objectives that yields all relevant components of fixed-point solutions.

Installing RDOT

First, set up a virtual environment (e.g. via miniconda, conda create -n rdot python=3, and conda activate rdot).

Method 1. Install via pypi

Install RDOT via pypi (We recommend doing this inside a virtual environment)

pip install rdot

Method 2. Install locally

  • Download or clone this repository and navigate to the root folder.

  • Install RDOT (inside a virtual environment)

    pip install -e .

Getting started

  • Check out the examples, which contains a notebook walking through rate distortion problems, and a comparison of IB solutions for rdot and embo.

Modules

The main module is rdot.optimizers, which includes a unified hierarchy of optimizer classes that use Blahut-Arimoto algorithms for defining and solving rate distortion objectives.

There are several auxiliary modules, including:

Testing

Unit tests are written using pytest in the test_rd.py file and executed via running pytest from the root folder.

References:

Shannon, C.E. (1959). Coding theorems for a discrete source with a fidelity criterion. Institute of Radio Engineers, National Convention Record 4:142–163.

Tishby, N., Pereira F.C., & Bialek, W. (1999). The information bottleneck method. Proceedings of the 37th Annual Allerton Conference on Communication, Control and Computing, eds Hajek B, Sreenivas RS (Univ of Illinois, Urbana, IL), pp 368– 377.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts