Kernel Maximum Mean Discrepancy
Compare kernel sample means while distinguishing a squared distance from an unbiased estimator.
Free theory articleCompare kernel sample means while distinguishing a squared distance from an unbiased estimator.
Concept & interpretation
The Kernel Maximum Mean Discrepancy (MMD) is a distance on the space of probability measures, evaluated based on the maximum difference in expectations over functions in a reproducing kernel Hilbert space (RKHS). It is a powerful tool to determine if two samples are drawn from different distributions.
Experiment
To see the difference between the biased and unbiased estimators, explore the Kernel Maximum Mean Discrepancy module.
- Select the Identical samples preset. Notice how the biased MMD squared is zero, as the sample means match perfectly. However, the unbiased estimator is negative.
- Change the Length scale to 0.5. Observe how the witness function becomes more sharply peaked around the sample points, as the kernel falls off more quickly.
- Switch to the Empty sample preset. Observe that both estimators become Unavailable, demonstrating that at least one sample in each set is required to compute the biased MMD squared.