profile pic
⌘ '
raccourcis clavier

problem statement

  • map xRdx \in R^d to zRqz \in \mathbb{R}^q with q<dq < d
  • A q×dq \times d matrix can represent a linear mapping: z=Axz = Ax
    • Assume that AAT=IA A^T = I (orthonormal matrix)

minimising reconstruction error

  • Given XRd×nX \in \mathbb{R}^{d \times n}, find AA that minimises the reconstruction error: minA,BixiBAxi22\min\limits_{A,B} \sum_{i} \| x^i - B A x^i \|_2^2

if q=dq=d, then error is zero.

Solution:

  • B=ATB = A^T
  • minAixiATAxi2\min\limits_{A} \sum_i \| x^i - A^T A x^i \|^2 is subjected to AAT=Iq×qA A^T = I_{q \times q}
  • assuming data is centered, or 1n_ixi=[00]T\frac{1}{n} \sum\_{i} x^i = \begin{bmatrix} 0 & \cdots & 0 \end{bmatrix}^T

eigenvalue decomposition

XTXu=λuXTX=UTΛUΛ=diag(λ1,λ2,,λd)=[λ1000λ2000λq]\begin{aligned} X^T X \mathcal{u} &= \lambda \mathcal{u} \\ X^T X &= U^T \Lambda U \\ \\ \\ \because \Lambda &= \text{diag}(\lambda_1, \lambda_2, \cdots, \lambda_d) \\ &= \begin{bmatrix} \lambda_1 & 0 & \cdots & 0 \\ 0 & \lambda_2 & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \lambda_q \end{bmatrix} \end{aligned}

pca

Idea: given input x1,,xnRdx^1, \cdots, x^n \in \mathbb{R}^d, μ=1nixi\mu = \frac{1}{n} \sum_{i} x^i

Thus

C=(xiμ)(xiμ)TC = \sum (x^i - \mu)(x^i - \mu)^T

Find the eigenvectors/values of CC:

C=UTΛUC = U^T \Lambda U

Optimal AA is:

A=[u1Tu2TuqT]A = \begin{bmatrix} u_1^T \\ u_2^T \\ \vdots \\ u_q^T \end{bmatrix}