A library for information flow analysis
Project description
Information Flow Analysis
=========================
IFA is a simple library for information flow analysis.
It's in Pre-alpha stage.
Installation
============
````bash
sudo make install
````
Usage
=====
Computing Jensen–Shannon divergence:
````python
from ifa.distribution import Distribution
from ifa.divergence import jsd
from numpy.testing import assert_allclose
p = Distribution(["A", "B"], [0.5, 0.5])
q = Distribution(["A", "C"], [0.5, 0.5])
assert_allclose(jsd(p, 0.5, q, 0.5), [0.5])
````
=========================
IFA is a simple library for information flow analysis.
It's in Pre-alpha stage.
Installation
============
````bash
sudo make install
````
Usage
=====
Computing Jensen–Shannon divergence:
````python
from ifa.distribution import Distribution
from ifa.divergence import jsd
from numpy.testing import assert_allclose
p = Distribution(["A", "B"], [0.5, 0.5])
q = Distribution(["A", "C"], [0.5, 0.5])
assert_allclose(jsd(p, 0.5, q, 0.5), [0.5])
````
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ifa-0.0.3.tar.gz
(162.3 kB
view hashes)