Git Product home page Git Product logo

mdre's Introduction

mdre

Estimating the Density Ratio between Distributions with High Discrepancy using Multinomial Logistic Regression

Environment setup

We use two environments for our experiments. For all of the experiments except the high dimensional ones, we use PyTorch. For the high dimensional experiments, we use Tensorflow.

We provide conda environment configuration files to easy reproducibility: torch_env.yml and tf_env.yml

conda env create -f [***.yml]

1D Experiments

Use notebooks/mdre-1d-exps.ipynb in order to reproduce our MDRE 1D experiments on density ratio estimation. The default experiment and hyperparameters are set for the case in which p~N(-1, 0.1), q~N(1, 0.2), and m~Cauchy(0, 1.0). The experiment configurations and hyperparameters can be changed in the third block of the notebook, if one would like to change the experiment settings.

High-dimensional Experiments

Use notebooks/mdre-highdim-exps.ipynb in order to reproduce our MDRE high dimensional experiments on density ratio estimation / mutual information estimation. The default experiment and hyperparameters are set for the case in which p~N(-1, 0.1), q~N(1, 0.2), and m~Cauchy(0, 1.0). The experiment configurations and hyperparameters can be changed in the third block of the notebook, if one would like to change the experiment settings.

Omniglot experiments

MDRE

Use notebooks/omniglot-mdre.ipynb in order to reproduce our MDRE representation learning experiments on SpatialMultiOmniglot. The default experiment is currently set to the one with 9 characters (3 x 3 grid of Omniglot characters) and the default hyperparameters are set for that experiment. If one would like to reproduce other experiments with 1 character or 4 characters (1 x 1 grid, 2 x 2 grid), then one only needs to change the according hyperparameters NUM_CHARS and ALPHAS mask size accordingly.

BCDRE

Use notebooks/omniglot-bcdre.ipynb in order to reproduce BCDRE representation learning experiments on SpatialMultiOmniglot. The default is set to the one with 4 characters (2 x 2 grid of Omniglot characters). One can modify the same hyperparamters mentioned above to run this BCDRE baseline experiment for different configurations.

Omniglot Data

Download the data using the following link and place it within ./data/omniglot in this repository.

https://drive.google.com/file/d/1r5_r92wisYs4hSXk-jxdBVBuMHpwUbXX/view?usp=share_link

mdre's People

Contributors

hanseungwook avatar akashgit avatar

Stargazers

 avatar  avatar Radi Radev avatar  avatar

Watchers

 avatar James Cloos avatar Kostas Georgiou avatar  avatar

mdre's Issues

Missing ratio_utils_highdim_exp_fam module

In notebooks/mdre-highdim-exps.ipynb, I assume that ratio_utils_highdim_exp_fam is required to import multiple necessary functions (e.g. get_loss(), get_optim(), get_gt_ratio_kl(), get_kl_from_cob(), get_logits(), and reset()). However, this module is missing from the repo.

Also, run_config() is also missing some other variables such as n_dims, bs, K, and num_samples. However, I think these are just experiment parameters, but it would be nice to know what their values are in your experiment.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.