Rewriting the objective function of PCA

102 Views Asked by At

Let $X \in \Bbb R^{m \times n}$ and $V \in \Bbb R^{m\times d}$. Prove that $$ \mathcal{F}_{\mathrm{PCA}}(Y)=\sum_{i=1}^{n}\left\|y_{i}-\frac{1}{n} \sum_{j=1}^{n} y_{j}\right\|_{2}^{2} = \operatorname{Tr}\left[V^{T} X\left(I-\frac{1}{n} \mathbf{1 1}^{T}\right) X^{T} V\right] $$ where $y_{i} := V^{T} x_{i}$ and $\mathbf{1}$ denotes the vector of all ones.


This is how I tried to prove it.

$$\begin{aligned} \sum_{i=1}^{n}\left\|y_{i} - \frac{1}{n} \sum_{j=1}^{n} y_{j}\right\|_{2}^{2} &= \sum_{i=1}^{n} \left( V^T x_i - \frac{1}{n} \sum_{j=1}^{n} V^T x_j \right) \left( V^T x_i - \frac{1}{n} \sum_{j=1}^{n} V^T x_j \right)^T \\ &= \operatorname{Tr}\left[ V^T X \left(I-\frac{1}{n} \mathbf{1}\right) X^T V \left(I- \frac{1}{n}\mathbf{1^T}\right) \right]\end{aligned}$$

1

There are 1 best solutions below

7
On BEST ANSWER

$$\left\| {\rm Y} - \frac1n {\rm Y} {\Bbb 1}_n {\Bbb 1}_n^\top \right\|_{\text{F}}^2 = \left\| {\rm Y} \left( {\rm I}_n - \frac1n {\Bbb 1}_n {\Bbb 1}_n^\top \right) \right\|_{\text{F}}^2 = \mbox{tr} \left( {\rm Y} \left( {\rm I}_n - \frac1n {\Bbb 1}_n {\Bbb 1}_n^\top \right) {\rm Y}^\top \right)$$