α-Geodesical Skew Divergence
Official PyTorch Implementation of "α-Geodesical Skew Divergence".
[arXiv]
The asymmetric skew divergence smooths one of the distributions by mixing it, to a degree determined by the parameter λ, with the other distribution. Such divergence is an approximation of the KL divergence that does not require the target distribution to be absolutely continuous with respect to the source distribution. In this paper, an information geometric generalization of the skew divergence called the α-geodesical skew divergence is proposed, and its properties are studied.
Installation
From PyPi
$ pip install gs_divergence
From GitHub
$ git clone https://github.com/nocotan/geodesical_skew_divergence
$ python setup.py install
Usage
import torch
from gs_divergence import gs_div
a = torch.Tensor([0.1, 0.2, 0.3, 0.4])
b = torch.Tensor([0.2, 0.2, 0.4, 0.2])
div = gs_div(a, b, alpha=-1, lmd=0.5)
| parameter | description |
|---|---|
| input | Tensor of arbitrary shape |
| target | Tensor of the same shape as input |
| alpha | Specifies the coordinate systems which equiped the geodesical skew divergence (default=-1) |
| lmd | Specifies the position on the geodesic (default=0.5) |
| reduction | Specifies the reduction to apply to the output: 'none' | 'batchmean' | 'sum' | 'mean'. 'none': no reduction will be applied 'batchmean': the sum of the output will be divided by the batchsize 'sum': the output will be summed 'mean': the output will be divided by the number of elements in the output default='sum' |
Definition of α-Geodesical Skew Divergence
Visualizations of the α-Geodesical Skew Divergence
Monotonicity of the α-geodesical skew divergence with respect to α
Continuity of the α-geodesical skew divergence with respect to α and λ.
Citation
@misc{kimura2021geodesical,
title={$α$-Geodesical Skew Divergence},
author={Masanari Kimura and Hideitsu Hino},
year={2021},
eprint={2103.17060},
archivePrefix={arXiv},
primaryClass={cs.IT}
}
Metadata
Release files for gs-divergence 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gs_divergence-1.0.8.tar.gz | 4.8 kB | Without provenance | Details for gs_divergence-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gs_divergence-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for gs_divergence-1.0.8-py3-none-any.whl |
Total release size: 11.3 kB
Release files / gs_divergence-1.0.8.tar.gz
| Download URL | gs_divergence-1.0.8.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3c7473b40e2460972ee36f68ad58d99b32e0e4c980ef58ea2fe42e2381220ce7
|
|
BLAKE2b-256 checksum How to use checksums |
51da04389a3cd19ee29244afd86eff028d02db995123b6b9851aa384108f14bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Release files / gs_divergence-1.0.8-py3-none-any.whl
| Download URL | gs_divergence-1.0.8-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b4d9f52b9b1ebd2837649b0b6300b7421960ea69f8c1875059e870c623f4a92
|
|
BLAKE2b-256 checksum How to use checksums |
512118c4c4d73be6c53dcd6ea039e693b0b80eb377a6822baa15fed2333adf1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
|
Security for gs-divergence 1.0.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.