where \(\mathcal {F}\)  is the
class of functions \(f\) 
in the unit ball of
the reproducing kernel Hilbert space associated with a kernel function \(k\) . We defer the discussion on kernels appropriate for use with MMD to Appendix , and will discuss the choice of kernel function \(k\)  in Sec. . Note that \(\text{MMD}(\mathcal {F}, \mathcal {D}^{\prime }, \mathcal {D}) = 0\)  iff \(\mathcal {D}^{\prime } = \mathcal {D}\)  [1]}.
Let the reference dataset \(T := D_1 \cup \ldots \cup D_n \cup G\)  denote a union of the pooled dataset with the synthetic dataset and hence represents all available data in our problem setting.
Let \(t := |T|\)  and \(S\)  be any arbitrary subset of \(T\)  where \(s := |S|\) .
The unbiased estimate \({\text{MMD}}^2_u(\mathcal {F}, S, T)\)  and biased estimate \({\text{MMD}}^2_b(\mathcal {F}, S, T)\)  of the squared MMD can be obtained in the form of matrix Frobenius inner products, as shown in [1]}:
\(\begin{array}{l}\displaystyle {\text{MMD}}^2_u(\mathcal {F}, S, T)= \displaystyle \langle (s(s-1))^{-1} 1_{[x, x^{\prime } \in S, x \ne x^{\prime }]}\ - \vspace{2.84526pt}\\\quad 2(st)^{-1} 1_{[x \in S, x^{\prime }\in T]} + (t(t-1))^{-1}1_{[x, x^{\prime }\in T, x \ne x^{\prime }]}, \mathbf {K} \rangle \vspace{5.69054pt}\\\displaystyle {\text{MMD}}^2_b(\mathcal {F}, S, T)= \displaystyle \langle s^{-2} 1_{[x, x^{\prime } \in S]} \ - \vspace{2.84526pt}\\\quad 2(st)^{-1} 1_{[x \in S, x^{\prime }\in T]} + t^{-2}1_{[x, x^{\prime }\in T]}, \mathbf {K} \rangle \vspace{-11.38109pt}\end{array}\vspace{5.69054pt}\) 
