Skip to content

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

Notifications You must be signed in to change notification settings

epabarker/BlahutArimoto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%