Ennemi

Latest version: v1.5.0

Safety actively analyzes 682487 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

1.1.1

[![DOI](https://zenodo.org/badge/247088713.svg)](https://zenodo.org/badge/latestdoi/247088713)

`ennemi`: _easy nearest neighbor estimation of mutual information_. Mutual information (MI) can be used to find non-linear correlations between variables, and this Python 3 package is designed to fit into your data analysis workflow.

This patch release contains only minor changes. There is no difference in the algorithms compared to 1.1.0.

The documentation for this release is available at https://polsys.github.io/ennemi. This release requires at least
- Python 3.7
- NumPy 1.17.5
- SciPy 1.4.0
- (Optional: pandas 1.0.0)

1.1.0

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5158844.svg)](https://doi.org/10.5281/zenodo.5158844)

This release contains minor quality-of-life improvements to `ennemi`: _easy nearest neighbor estimation of mutual information_. Mutual information (MI) can be used to find non-linear correlations between variables, and this Python 3 package is designed to fit into your data analysis workflow.

The documentation for this release is available at https://polsys.github.io/ennemi. This release requires at least
- Python 3.7
- NumPy 1.17.5
- SciPy 1.4.0
- (Optional: pandas 1.0.0)

1.0.0post1

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4531307.svg)](https://doi.org/10.5281/zenodo.4531307)

This is the first stable release of `ennemi`: _easy nearest neighbor estimation of mutual information_. Mutual information (MI) can be used to find non-linear correlations between variables, and this Python 3 package is designed to fit into your data analysis workflow.

The documentation for this release is available at https://polsys.github.io/ennemi. This release requires at least
- Python 3.6
- NumPy 1.17.5
- SciPy 1.4.0
- (Optional: pandas 1.0.0)

Features of `ennemi`
- Estimation of MI and the related correlation coefficient from continuous data
- Also supported: MI between discrete and continuous variables
- Removal of known factors by conditioning on one or more variables
- Time delays, masks, and NaN removal
- Interface designed for practical data analysis
- Support for plain Python, NumPy and Pandas data types
- Optimized and parallelized algorithm

Changes since beta1
- We have documented the [future support policy](https://polsys.github.io/ennemi/support.html).
- The package supports Python 3.9 and NumPy 1.20.
- Minor internal improvements.

Installation
This package is available on PyPI. To install it, execute

pip install ennemi

on your Python installation.

Contributing
Your feedback is very valuable! If you encounter any problems, please [file an issue](https://github.com/polsys/ennemi/issues). Code contributions are welcomed as well.

1.0.0

One small feature and minor fixes.

- Discrete MI:
- Now you can compute exact MI between two discrete variables
- Conditioning with discrete condition (any dimension) is supported
- Pairwise MI between any kind of variables (conditioning limited for now)
- Documentation: [Working with discrete data](https://polsys.github.io/ennemi/discrete-data.html)
- Improved type annotations. Type annotations are only supported with NumPy 1.21 and newer.
- Removed support for Python 3.6.

Installation
This package is available on PyPI. To install/update it, execute

pip install --upgrade ennemi

on your Python installation.

Contributing
Your feedback is very valuable! If you encounter any problems, please [file an issue](https://github.com/polsys/ennemi/issues). Code contributions are welcomed as well.

1.0.0beta1

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3981977.svg)](https://doi.org/10.5281/zenodo.3981977)

This is the first **beta** release of `ennemi`: _easy nearest neighbor estimation of mutual information_. Mutual information (MI) can be used to find non-linear correlations between variables, and this Python 3 package is designed to fit into your data analysis workflow.

The documentation for this release is available at https://polsys.github.io/ennemi. This release requires at least
- Python 3.6
- NumPy 1.17.5
- SciPy 1.4.0
- (Optional: pandas 1.0.0)

Highlights of this release
- The algorithm is now much faster: more than 10x speedups across all estimation methods are common.
- Added support for MI between discrete `y` and continuous `x`. Pass the `discrete_y` parameter to `estimate_mi()` to enable. All features, including conditioning, are supported.
- MI methods preprocess the data by rescaling to unit variance and adding noise. You can opt out of this behavior by setting `preprocess=False`. More complicated transformations (e.g. logarithming) are still up to you.
- Improvements to the documentation.

Other changes
- Type annotations are included in the package. You can use `mypy` to verify type-correctness of your code.
- Parallelism is now implemented in threads instead of processes. As a **breaking change**, the `parallel` parameter is replaced by a `max_threads` parameter.
- The parallelized methods accept a `callback` parameter. You can implement e.g. progress bars for long-running tasks with it.
- You can now pass `drop_nan=True` to ignore missing values. This complements the `mask` parameter by not being fixed to the `y` variable.
- You can now set a separate lag for each conditioning variable by passing a 2D array to `cond_lag`.
- Bug fix: entropy estimation with both `mask` and `cond` now works.
- Internal testing improvements.

Installation
This package is available on PyPI. To install it, execute

pip install ennemi

on your Python installation.

Contributing
Your feedback is very valuable! If you encounter any problems, please [file an issue](https://github.com/polsys/ennemi/issues). Code contributions are welcomed as well.

This release was contributed to by: morrme.

1.0.0alpha2

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3929187.svg)](https://doi.org/10.5281/zenodo.3929187)

This is the second **alpha** release of `ennemi`: _easy-to-use nearest neighbor estimation of mutual information_. Mutual information (MI) can be used to find non-linear correlations between variables, and this Python 3 package is designed to fit into your data analysis workflow.

This release requires Python 3.6 and NumPy 1.17.5, or newer. The documentation for this release is available at https://polsys.github.io/ennemi.

Highlights
- The `pairwise_mi` method makes it easy to create pairwise MI/correlation matrices. All the nice features of `estimate_mi` are there: it supports `pandas` and uses all the CPU cores for faster estimation.
- The documentation has been improved. A new case study with real-world data is included.
- The new `estimate_entropy` method implements nearest-neighbor estimation of differential entropy. This method is mostly included for completeness, but we have still more love planned for it.

Other changes
- The `normalize` parameter to `estimate_mi` removes the need for `normalize_mi(estimate_mi(...))`. The `normalize_mi` method won't be going anywhere, if you still need to use it.
- Improved some error messages and input checks. It should now be harder to get an ugly backtrace deep within the algorithm.
- You can now install the development dependencies by `pip install ennemi[dev]`.
- Extended the test suite with several realistic test cases. You can be more confident that `ennemi` does what it promises.

Installation
This package is available on PyPI. To install it, execute

pip install ennemi

on your Python installation.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.