Skip to main content

PyTorch implementation of α-geodesical skew divergence

Project description

α-Geodesical Skew Divergence

GitHub license GitHub repo size GitHub Workflow Status PyPI arXiv GitHub Repo stars

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}
}

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

gs_divergence-1.0.8.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gs_divergence-1.0.8-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file gs_divergence-1.0.8.tar.gz.

File metadata

  • Download URL: gs_divergence-1.0.8.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for gs_divergence-1.0.8.tar.gz
Algorithm Hash digest
SHA256 3c7473b40e2460972ee36f68ad58d99b32e0e4c980ef58ea2fe42e2381220ce7
MD5 8a131fc01abc2885b4a758403c03d8d0
BLAKE2b-256 51da04389a3cd19ee29244afd86eff028d02db995123b6b9851aa384108f14bb

See more details on using hashes here.

File details

Details for the file gs_divergence-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: gs_divergence-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for gs_divergence-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 6b4d9f52b9b1ebd2837649b0b6300b7421960ea69f8c1875059e870c623f4a92
MD5 147875fa0f2f45be1f12f2529de1cea6
BLAKE2b-256 512118c4c4d73be6c53dcd6ea039e693b0b80eb377a6822baa15fed2333adf1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page