Tópico 15
Pseudo-inversa e PCA

Pedro Aladar Tonelli

Pseudo-inversa

Primeiro definimos a pseudo-inversa de uma matriz diagonal $m\times n$

$$ \Sigma = \begin{bmatrix}\sigma_1 & 0 & \cdots & 0 & 0 \\ \vdots & \ddots & & & \\ 0 & 0 & \sigma_r& \cdots & 0 \\ 0 & 0 & \cdots & 0 & 0 \\ 0 & 0 & \cdots & 0 & 0 \end{bmatrix}$$

Definimos a pseudo inversa como a matriz $n \times m$

$$ \Sigma^+ = \begin{bmatrix}\frac{1}{\sigma_1} & 0 & \cdots & 0 & 0 \\ \vdots & \ddots & & & \\ 0 & 0 & \frac{1}{\sigma_r}& \cdots & 0 \\ 0 & 0 & \cdots & 0 & 0 \\ 0 & 0 & \cdots & 0 & 0 \end{bmatrix}$$

No caso geral

\begin{gather} A=U\Sigma V^T \\ A^+ = V\Sigma^+ U^T \end{gather}

Exemplos

$$\begin{bmatrix} 1 & 0 \\ 0 & 3 \\ 1 & 1 \end{bmatrix}\text{ }\begin{bmatrix} 0.5 & -0.5 \\ -0.5 & 0.5 \end{bmatrix} $$

Solução mais curta

Definimos a solução mais curta de $Ax=b$

$$ x^+ = A^+b$$

Exemplos

Se $A\in \mathbb{R}^{m\times n}$ tem posto $n$ então $$A^+ = (A^TA)^{-1}A^T$$

Se $A\in \mathbb{R}^{m\times n}$ e $x^+=A^+b$ então

$$ \| Ax-b\| \geq \|Ax^+-b\| \text{ }\forall x \in \mathbb{R}^n$$

Análise da Componente principal

\begin{array}{c|cccc|} & I_1 & I_2 & \cdots & I_n \\ \hline x_1 & a_{11} & a_{12}& \cdots & a_{1n} \\ x_2 & a_{21}& a_{22}& \cdots & a_{2n}\\ \vdots& & & & \vdots \\ x_m & a_{m1} & a_{m2} & \cdots & a_{mn} \end{array}
\begin{gather} m_i = \frac{1}{n}\sum_{j=1}^n a_{ij} \\ X={x_{ij}} \text{ com } x_{ij} = a_{ij}-m_i \\ \frac{1}{n}XX^T \text{ matriz de covariança} \end{gather}
Usando a decomposição espectral $$ \frac{1}{n}XX^T = U \Sigma^2 U^T $$ as colunas de $U$ são as componentes principais