Code for the paper "Generative Models and Model Criticism via Optimized Maximum Mean Discrepancy" (arXiv:1611.04488; submitted to ICLR 2017).
- General code for learning kernels for a fixed two-sample test, with Theano, is in two_sample; in particular, a Theano implementation of the estimator code is in
two_sample/mmd.py. - Code for the GAN models, using TensorFlow, is in gan. If you just want a TensorFlow implementation of the estimator code, see
gan/mmd.py. - Code for the efficient permutation test described in Section 3 is in the
feature/bigtestbranch of Shogun; look undershogun/src/shogun/statistical_testing. We're hoping to get that merged onto mainline shogun soon. An example of using it in the Python API is intwo_sample/mmd_test.py; code to reproduce the experiments coming soon.
This code is under a BSD license, but if you use it, please cite the paper.