# Kernel Geometric Mean Metric Learning
## 3 Main Results
### Extension to Weighted Geometric Mean and Solution
\begin{split} M_{\[PERSON]}&=S_{\[PERSON]}{}^{-1}\sharp_{t}D_{\[PERSON]}\\ &=\frac{2 sin(\pi t)}{\pi}S_{\[PERSON]}^{-1}\int_{-1}^{1}(1-s)^{-t}(1+s)^{t-1}((1-s )I+(1+s)D_{\[PERSON]}^{-1}S_{\[PERSON]}^{-1})^{-1}\mathrm{d}s\\ &=\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}(1-s)^{-t}(1+s)^{t-1}((1-s)S_{\Phi}+(1 +s)D_{\[PERSON]}^{-1})^{-1}\mathrm{d}s\\ &=\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}(1-s)^{-t}(1+s)^{t-1}((1-s)S_{\Phi}+(1 +s)D_{\Phi}^{-1})^{-1}\mathrm{d}s.\end{split}  \tag{14}\]  
According to the definitions of \(P_{\Phi}\) and \(Q_{\Phi}\), \(S_{\Phi}\) and \(D_{\Phi}\) can be written as \(S_{\Phi}~{}=~{}P_{\Phi}P_{\Phi}^{\T}\), \(D_{\Phi}=Q_{\Phi}Q_{\Phi}^{\T}\). Substituting them into Equation (14), it is clear that  
\[M_{\Phi}=\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}(1-s)^{-t}(1+s)^{t-1}((1-s)P_{ \Phi}P_{\Phi}^{\T}+(1+s)(Q_{\Phi}Q_{\Phi}^{\T})^{-1})^{-1}\mathrm{d}s. \tag{15}\]  
For convenience in the following discussion, we introduce the notation  
\[G=\bigg{(}(1-s)P_{\[PERSON]}P_{\[PERSON]}^{\T}+(1+s)\Big{(}Q_{\[PERSON]}Q_{\[PERSON]}^{\T}\Big{)}^ {-1}\bigg{)}^{-1}.\]  
From Lemma 2, it follows that  
\[G=(A+UCV)^{-1}=A^{-1}-A^{-1}U\big{(}C^{-1}+VA^{-1}U\big{)}^{-1}VA^{-1}, \tag{16}\]where \(A=(1+s)\big{(}Q_{\[PERSON]}Q_{\[PERSON]}^{\sf T}\big{)}^{-1}\), \(U=P_{\[PERSON]}\), \(C=(1-s)I\), \(V=P_{\Phi}^{\sf T}\). Then, taking it into Equation (15), one has  
\[ \begin{split} M_{\Phi}&=\frac{2 sin(\pi t)}{\pi}\int_{- 1}^{1}{(1-s)}^{-t}(1+s)^{t-1}[\frac{Q_{\Phi}Q_{\Phi}^{\sf T}}{1+s}-\frac{Q_{ \Phi}Q_{\Phi}^{\sf T}}{1+s}\cdot P_{\Phi}\Bigg{(}\frac{I^{-1}}{1-s}+P_{\Phi}^{ \sf T}\cdot\frac{Q_{\Phi}Q_{\Phi}^{\sf T}}{1+s}\cdot P_{\[PERSON]}\Bigg{)}^{-1}P_{ \[PERSON]}^{\sf T}\frac{Q_{\[PERSON]}Q_{\[PERSON]}^{\sf T}}{1+s}]\mathrm{d}s\\ &=\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}{(1-s)}^{-t}(1+s)^{t-1}[ \frac{Q_{\[PERSON]}Q_{\[PERSON]}^{\sf T}}{1+s}-\frac{Q_{\[PERSON]}}{1+s}\cdot K_{PQ}{}^{\sf T }\Bigg{(}\frac{I^{-1}}{1-s}+\frac{K_{PQ}K_{PQ}{}^{\sf T}}{1+s}\Bigg{)}^{-1} \frac{K_{PQ}Q_{\[PERSON]}{}^{\sf T}}{1+s}]\mathrm{d}s\\ &=\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}{(1-s)}^{-t}(1+s)^{t-1}Q_{ \[PERSON]}[\frac{I}{1+s}-\frac{K_{PQ}{}^{\sf T}}{1+s}\Bigg{(}\frac{I^{-1}}{1-s}+ \frac{K_{PQ}K_{PQ}{}^{\sf T}}{1+s}\Bigg{)}^{-1}\frac{K_{PQ}}{1+s}]Q_{\[PERSON]}^{ \sf T}\mathrm{d}s\\ &=\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}{(1-s)}^{-t}(1+s)^{t-1}Q_{ \Phi}((1+x)I+(1-x)K_{PQ}{}^{\sf T}K_{PQ})^{-1}Q_{\Phi}^{\sf T}\mathrm{d}s\\ &=Q_{\Phi}\frac{2 sin(\pi t)}{\pi}\int_{-1}^{1}{(1-s)}^{-t}(1+s)^{ t-1}\bigg{(}(1+s)\Big{(}K_{PQ}{}^{\sf T}K_{PQ}\Big{)}^{-1}\Big{(}K_{PQ}{}^{ \sf T}K_{PQ}\Big{)}+(1-s)\Big{(}K_{PQ}{}^{\sf T}K_{PQ}\Big{)}\bigg{)}^{-1} \mathrm{d}sQ_{\Phi}^{\sf T}\\ &=Q_{\Phi}\Big{(}K_{PQ}{}^{\sf T}K_{PQ}\Big{)}^{-1}\frac{2 sin(\pi t )}{\pi}\int_{-1}^{1}{(1-s)}^{-t}(1+s)^{t-1}\bigg{(}(1-s)I+(1+s)\Big{(}K_{PQ}{} ^{\sf T}K_{PQ}\Big{)}^{-1}\Bigg{)}^{-1}\mathrm{d}sQ_{\Phi}^{\sf T}\\ &=Q_{\Phi}\big{[}\Big{(}K_{PQ}{}^{\sf T}K_{PQ}\Big{)}^{-1}\sharp_ {t}I]Q_{\Phi}^{\sf T}.\end{split}  \tag{17}\]  
From Lemma 3, it follows that  
\[ \begin{split} M_{\Phi}=& Q_{\Phi}\Big{(}K_{PQ}{}^{ \sf T}K_{PQ}\Big{)}^{-1}\bigg{(}\Big{(}I\cdot K_{PQ}{}^{\sf T}K_{PQ}\Big{)}^{-1} \Bigg{)}^{-t}Q_{\Phi}^{\sf T}\\ =& Q_{\Phi}\Big{(}K_{PQ}{}^{\sf T}K_{PQ}\Big{)}^{t-1}Q _{\Phi}{}^{\sf T}.\end{split}  \tag{18}\]  
\(\Box\)  
**Theorem 2**. : _The distance \(d_{M_{\Phi}}(x,x^{\prime})=(\Phi(x)-\Phi(x^{\prime}))^{\sf T}M_{\Phi}(\Phi(x)- \Phi(x^{\prime}))\) of any two sample \(x\) and \(x^{\prime}\) can be rewritten as_  
\[d_{M_{\Phi}}(x,x^{\prime})=(K_{xQ}-K_{x^{\prime}Q})\Big{(}K_{PQ}{}^{\sf T}K_{PQ }\Big{)}^{t-1}(K_{xQ}{}^{\sf T}-K_{x^{\prime}Q}{}^{\sf T}).\]  
_where \(K_{xQ}=\Phi(x)^{\sf T}Q_{\[PERSON]}=K_{xQ_{1}}-K_{xQ_{2}},K_{x^{\prime}Q}=\[PERSON](x^{ \prime})^{\sf T}Q_{\[PERSON]}=K_{x^{\prime}Q_{1}}-K_{x^{\prime}Q_{2}}\), and_  
\[K_{xQ_{1}}=\[PERSON](x)^{\sf T}Q_{\[PERSON] 1}=\left[