opt-mmd
opt-mmd copied to clipboard
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).
https://github.com/djsutherland/opt-mmd/blob/5c02a92972df099628a4bc8351980ad9f317b6d0/two_sample/mmd.py#L44-L49
Is this implementation intended to match the estimate linked above?
Cheers