Giter Site home page Giter Site logo

djsutherland / opt-mmd Goto Github PK

View Code? Open in Web Editor NEW
205.0 13.0 71.0 100 KB

Learning kernels to maximize the power of MMD tests

Home Page: https://arxiv.org/abs/1611.04488

License: BSD 3-Clause "New" or "Revised" License

Python 72.60% Jupyter Notebook 26.74% Shell 0.65%
machine-learning hypothesis-testing generative-adversarial-network maximum-mean-discrepancy shogun theano tensorflow python kernel-methods statistical-tests

opt-mmd's Introduction

Code for the paper "Generative Models and Model Criticism via Optimized Maximum Mean Discrepancy" (arXiv:1611.04488; published at ICLR 2017), by Dougal J. Sutherland (@dougalsutherland), Hsiao-Yu Tung, Heiko Strathmann (@karlnapf), Soumyajit De (@lambday), Aaditya Ramdas, Alex Smola, and Arthur Gretton.

This code is under a BSD license, but if you use it, please cite the paper.

opt-mmd's People

Contributors

djsutherland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opt-mmd's Issues

tmmd not maximizing the test power

Hi,
Thanks for sharing. In the tmmd_model.py file, the optimizer seems just trys to minimize the ratio-loss, which should be the approximated test power mentioned in the paper. Shouldn't we increase the test power? I can't find any "-" there. Do I miss anything?

Python package tables is required but not automatically installed

Issue: python package tables is required by pandas, but not automatically installed.

How to reproduce:

python fixed_run.py -n 500 --blobs 1

Error message:

HDFStore requires PyTables, "No module named tables" problem importing

Fix:
pip install tables fixed the problem for me.
Add requirement tables to requirements.txt

System:
MacOS 10.11., python 2.7.12

Missing coefficient for cross term in MMD

Apologies if I'm missing something obvious, but the estimate defined in equation (3) of https://www.jmlr.org/papers/volume13/gretton12a/gretton12a.pdf looks slightly different to the MMD estimate implemented here.

The first term makes sense to me, and subtracting m accounts for the summation over i != j (since diagonal of RBF kernel will add to m). Likewise for second term.
However the third term seems to be missing a factor 1 / (m*n).

m = K_XX.shape[0]
n = K_YY.shape[0]
mmd2 = ((K_XX.sum() - m) / (m * (m - 1))
+ (K_YY.sum() - n) / (n * (n - 1))
- 2 * K_XY.mean())

Is this implementation intended to match the estimate linked above?

Cheers

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.