Giter Site home page Giter Site logo

epabarker / blahutarimoto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alonkipnis/blahutarimoto

0.0 0.0 0.0 4 KB

Python implementation of the Blahut-Arimoto algorithm to compute the Rate-Distortion of an i.i.d distribution

Python 100.00%

blahutarimoto's Introduction

BlahutArimoto

Python implementation of the Blahut-Arimoto algorithm to compute the Rate-Distortion of an i.i.d distribution

Requirements: numpy

"""Compute the rate-distortion function of an i.i.d distribution Inputs : 'dist_mat' -- (numpy matrix) representing the distoriton matrix between the input alphabet and the reconstruction alphabet. dist_mat[i,j] = dist(x[i],x_hat[j]) 'p_x' -- (1D numpy array) representing the probability mass function of the source 'beta' -- (scalar) the slope of the rate-distoriton function at the point where evaluation is required 'max_it' -- (int) maximal number of iterations 'eps' -- (float) accuracy required by the algorithm: the algorithm stops if there is no change in distoriton value of more than 'eps' between consequtive iterations Returns : 'Iu' -- rate (in bits) 'Du' -- distortion """

Run the example by: $ python example.py

blahutarimoto's People

Contributors

alonkipnis avatar epabarker avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.