Skip to content

Python implementation of Universal Directed Information

License

Notifications You must be signed in to change notification settings

elipugh/directed_information

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Universal Estimation of Directed Information

Python3 implementation of the universal directed information estimators in Jiantao Jiao, Haim H. Permuter, Lei Zhao, Young-Han Kim, and Tsachy Weissman. "Universal estimation of directed information." IEEE Transactions on Information Theory 59, no. 10 (2013): 6220-6242.

See here: http://arxiv.org/abs/1201.2334

Also see MATLAB implementation

Authors

Eli Pugh, Ethan Shen

Installation

pip install directed_information

This package currently requires python 2 or 3, numpy, and tqdm.

Usage

from directed_information import *
import numpy as np

# to find DI, reverse DI, and MI between
# X and Y, using CTW algorithm depth 3
Nx = 2
D = 3
X = np.random.randint(Nx,size=50)
Y = np.random.randint(Nx,size=50)
DI, rev_DI, MI = compute_DI_MI(X,Y,Nx,D,"E4",0)

# to find DI, reverse DI, and MI between
# each row of X, using CTW algorithm depth 2
# (DI[i,j] is DI between rows i and j of X)
Nx = 2
D = 2
X = np.random.randint(Nx,size=(50,50))
DI, rev_DI, MI = compute_DI_MI_mat(X,Nx,D,0,"E3")

About

Python implementation of Universal Directed Information

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages