This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A divergence estimator of two sets of samples.

Project Description

universal-divergence

universal-divergence is a Python module for estimating divergence of two sets of samples generated from the two underlying distributions. The theory of the estimator is based on a paper written by Q.Wang et al [1].

Install

pip install universal-divergence

Example

from __future__ import print_function

import numpy as np
from universal_divergence import estimate

mean = [0, 0]
cov = [[1, 0], [0, 10]]
x = np.random.multivariate_normal(mean, cov, 100)
y = np.random.multivariate_normal(mean, cov, 100)
print(estimate(x, y))  # will be close to 0.0

mean2 = [10, 0]
cov2 = [[5, 0], [0, 5]]
z = np.random.multivariate_normal(mean2, cov2, 100)
print(estimate(x, z))  # will be bigger than 0.0

References

[1]Qing Wang, Sanjeev R. Kulkarni, and Sergio Verdú. “Divergence estimation for multidimensional densities via k-nearest-neighbor distances.” Information Theory, IEEE Transactions on 55.5 (2009): 2392-2405.
Release History

Release History

This version
History Node

0.2.0

History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
universal-divergence-0.2.0.tar.gz (2.7 kB) Copy SHA256 Checksum SHA256 Source Mar 16, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting