Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 1.48 KB

quadratic_time_mmd.rst

File metadata and controls

43 lines (26 loc) · 1.48 KB

Quadratic Time MMD

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, i.e. H0 : p = q.

The (biased) test statistic is given by

$$\frac{1}{nm}\sum_{i=1}^n\sum_{j=1}^m k(x_i,x_i) + k(x_j, x_j) - 2k(x_i,x_j).$$

See gretton2012kernel for a detailed introduction.

Example

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. The biased statistic is computed as

quadratic_time_mmd.sg:estimate_mmd_biased

There are multiple ways to perform the actual hypothesis test, see CQuadraticTimeMMD for details. The permutation version simulates from H0 via repeatedly permuting the samples from p and q:

quadratic_time_mmd.sg:perform_test

References

../../references.bib

Statistical_hypothesis_testing