看TCA算法涉及的一些推导做一些整理。 背景介绍见 https://zhuanlan.zhihu.com/p/26764147
- 最大均值差异(MMD,maximum mean discrepancy), 令\(\bar x_s, \bar x_t \in \mathbb{R}^D\) 分别表示源域 和 目标域样本均值。表示成矩阵形式为
\[\begin{align}
(\bar x_s - \bar x_t) &= \frac1{n_s}X_s 1_{n_s} -\frac1{n_t}X_t 1_{n_t} = [X_s, X_t] \left [\frac {1_{n_s}} {n_s} \atop -\frac {1_{n_t}} {n_t} \right] \\
(\bar x_s - \bar x_t) (\bar x_s - \bar x_t)^T &= [X_s, X_t] \left [\frac {1_{n_s}}{n_s} \atop -\frac {1_{n_t}} {n_t} \right] \Big[\frac {1_{n_s}^T} {n_s} , -\frac {1_{n_t}^T} {n_t} \Big] [X_s, X_t]^T \triangleq X M X^T \\
\end{align}
\]
再注意, \(\|v\|_2^2 = v^T v = {\rm tr}( vv^T)\), 于是 MMD 目标函数转化为
\[\|\bar\phi(x_s) - \bar \phi(x_t)\|_2^2 = {\rm tr}\big( \phi(X) M \phi(X)^T \big) = {\rm tr}\big( \phi(X)^T \phi(X) M \big) \triangleq {\rm tr}\big( K M \big)
\]
\[\|A^T(\bar x_s - \bar x_t)\|_2^2 = {\rm tr}\big(A^T (\bar x_s - \bar x_t) (\bar x_s - \bar x_t)^T A\big) = {\rm tr}\big(A^T XMX^T A\big)
\]