A library for information flow analysis
Project description
Information Flow Analysis
=========================
IFA is a simple and fast library for information theory research and information flow analysis. It's a Python module written C++, Cython.
Installation
============
Dependencies:
* numpy
If you have Cython some cpp files will get regenerated during installation
```bash
pip install ifa
```
Or if you want the developmen version:
```bash
git clone https://github.com/janekolszak/ifa.git;
cd ifa;
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])
```
What's inside:
==============
* Distribution class with some basic operations
* Divergences:
* Jensen–Shannon divergence
* Kullback–Leibler divergence
* Functions to compute information flow between distributions
=========================
IFA is a simple and fast library for information theory research and information flow analysis. It's a Python module written C++, Cython.
Installation
============
Dependencies:
* numpy
If you have Cython some cpp files will get regenerated during installation
```bash
pip install ifa
```
Or if you want the developmen version:
```bash
git clone https://github.com/janekolszak/ifa.git;
cd ifa;
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])
```
What's inside:
==============
* Distribution class with some basic operations
* Divergences:
* Jensen–Shannon divergence
* Kullback–Leibler divergence
* Functions to compute information flow between distributions
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.2.0.tar.gz
(171.8 kB
view details)
File details
Details for the file ifa-0.2.0.tar.gz
.
File metadata
- Download URL: ifa-0.2.0.tar.gz
- Upload date:
- Size: 171.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 645aefff8d97995125928273b1b38cfab218424c873837f41b3e46a1a5fbcb27 |
|
MD5 | 90bb87e90f98ace1810785fb7711b71c |
|
BLAKE2b-256 | 321ec5e396f12afef5470a751c0b255d0ac79e6df8120e2b0474d3535097f6cb |