Reliable-KL-estimation

This repository is the official PyTorch implementation of Reliable Estimation of KL Divergence using a Discriminator in Reproducing Kernel Hilbert Space.

Requirements

To install requirements: The code has been tested on Python 3.7, PyTorch 1.6.0. The requirements are minimal : numpy, pandas, matplotlib. You could also run the following:

pip install -r requirements.txt

Training, Evaluation, Plotting

Mutual Information Estimation

To estimate mutual information, run the following commands. Early commands generate results as pkl file while the last command plots the figure based on previously saved pkl data:

python kl_main.py
python kl_lip_features.py --lambd 0
python kl_lip_features.py --lambd 1e-05
python kl_lip_features.py --lambd 0.001
python kl_lip_features.py --lambd 0.1
python kl_lip_features.py --lambd 1
python plot_method_array_short.py