The Quadratic time MMD implements a nonparametric statistical hypothesis test to reject the null hypothesis that to distributions p and q, only observed via n and m samples respectively, are the same:
H0 : p = q.
The (biased) test statistic is given by
See gretton2012kernel
for a detailed introduction.
Imagine we have samples from p and q. We create CDenseFeatures (here 64 bit floats aka RealFeatures)as
quadratic_time_mmd.sg:create_features
We create an instance of CQuadraticTimeMMD
, passing it data the kernel, and the test significance level α
quadratic_time_mmd.sg:create_instance
We can select multiple ways to compute the test statistic, see CQuadraticTimeMMD
for details. Unbiased statistic
quadratic_time_mmd.sg:estimate_mmd_unbiased
Biased statistic
quadratic_time_mmd.sg:estimate_mmd_biased
There are multiple ways to perform the actual hypothesis test. The permutation version simulates from H0 via repeatedly permuting the samples from p and q:
quadratic_time_mmd.sg:perform_test_permutation
The spectrum version simulates from H0 via approximating the Eigenspectrum of the underlying kernel:
quadratic_time_mmd.sg:perform_test_spectrum
The Gamma version fit a Gamma cumulative distribution function to H0 via moment matching:
quadratic_time_mmd.sg:perform_test_gamma
../../references.bib
Statistical_hypothesis_testing