{%hackmd SybccZ6XD %} How to control? > PCA (Principal Component Analysis) ## PCA Convariance matrix > $$ \begin{gathered} \begin{bmatrix} Var(a) & Convar(a, b) \\ Convar(a, b) & Var(b) \end{bmatrix} \end{gathered} $$ Eigen value and vactor > There exists a vector that makes the covariance equal to 0. $$ \begin{gathered} \begin{bmatrix} Var(a) & Convar(a, b) \\ Convar(a, b) & Var(b) \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} = \begin{bmatrix} \lambda & 0 \\ 0 & \lambda \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix} \end{gathered} $$ ## PCA in the styleGAN Architecture > ![](https://hackmd.io/_uploads/rkJZ5vqtn.png) Steps - sample N random vectors $z_{1:N}$ - compute the corresponding $w_i = M(z_i)$ - compute PCA of these $w_{1:N}$ and find new basis V for W - $w' = w + Vx$ ## Result ![](https://hackmd.io/_uploads/H1Bnjw9F2.png) $E(v_i, j-k)$ to denote edit directions; for example, $E(v_1, 0-3)$ means moving along component v1 at the first four layers only. The first few components control large-scale variations, including apparent gender expression and head rotation. ## Problem ![](https://hackmd.io/_uploads/rkmOjP9K3.png) Rotating a dog often causes its mouth to open, perhaps a product of correlations in portraits of dogs.