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
Metadata
Release files for universal-divergence 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| universal-divergence-0.2.0.tar.gz | 2.7 kB | Details |
Release files / universal-divergence-0.2.0.tar.gz
| Download URL | universal-divergence-0.2.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
812fb206a02ca21a00038403d412138578ee048848b32526bd2b1f95daaaebce
|
|
BLAKE2b-256 checksum How to use checksums |
58575f5e30e6ff1c6d63fb925517fcc467325bfa82f9a2e81a39bc69197e76d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |