silico.biotoul.fr
 

M1 BBS ACP

From silico.biotoul.fr

(Difference between revisions)
Jump to: navigation, search
m (Choix de l'origine)
m (Recherche de \Delta_1 passant par G d'inertie minimum)
 
(2 intermediate revisions not shown)
Line 6: Line 6:
* grand nombre de variables que l'on cherche à visualiser en 2 à 3 dimensions
* grand nombre de variables que l'on cherche à visualiser en 2 à 3 dimensions
* dessin de graphes
* dessin de graphes
-
 
-
 
-
 
-
ici schéma changement de repère (2 dimensions)
 
-
 
<math>\Rightarrow</math> '''Principe :''' trouver les axes sur lesquels on a un maximum de dispersion = plus de représentativité / moins de perte d'informations
<math>\Rightarrow</math> '''Principe :''' trouver les axes sur lesquels on a un maximum de dispersion = plus de représentativité / moins de perte d'informations
Line 76: Line 71:
</math>
</math>
-
== Mesure de dispersion = Inertie ==
+
== Mesure de dispersion : Inertie ==
=== Inertie par rapport à un point (le centre de gravité) ===
=== Inertie par rapport à un point (le centre de gravité) ===
Line 96: Line 91:
<math>\rightarrow</math> mesure la proximité du nuage des individus à l'axe.
<math>\rightarrow</math> mesure la proximité du nuage des individus à l'axe.
-
ici figure
+
[[Image:projection.orthogonale.png]]
=== Inertie par rapport à un sous-espace vectoriel ===
=== Inertie par rapport à un sous-espace vectoriel ===
<math>I_V = \frac{1}{n} \sum_{i=1}^n d^2(h_{Vi}, u_i)</math> C'est pareil.
<math>I_V = \frac{1}{n} \sum_{i=1}^n d^2(h_{Vi}, u_i)</math> C'est pareil.
 +
 +
=== Décomposition de l'inertie totale ===
 +
 +
<math>V^*</math> le complémentaire orthogonal de <math>V</math>
 +
 +
[[Image:inertie.portee.par.l.axe.png]]
 +
 +
on a <math>I_G = I_{V} + I_{V^*}</math>
 +
 +
En projetant sur <math>V</math>, on perd l'inertie mesurée par <math>I_{V}</math> et il ne reste plus que celle mesurée par <math>I_{V^*}</math>
 +
 +
 +
 +
== Recherche de <math>\Delta_1</math> passant par ''G'' d'inertie minimum ==
 +
 +
maximise <math>\Delta_1^*</math> avec <math>\overrightarrow{Ga_1}</math> vecteur unitaire de <math>\Delta_1^*</math>
 +
 +
 +
 +
<math>d^2(G, h_{\Delta_1^*i}) = \langle \overrightarrow{Gu_i}, \overrightarrow{Ga_1} \rangle ^2
 +
= a_1^T U_{ci} U_{ci}^T a_1
 +
</math>
 +
 +
 +
 +
donc <math>I_{\Delta_1^*} = \frac{1}{n} \sum_{i=1}^n  a_1^T U_{ci} U_{ci}^T a_1
 +
= a_1^T \frac{1}{n} \sum_{i=1}^n  U_{ci} U_{ci}^T a_1
 +
</math>
 +
 +
 +
 +
on reconnaît la matrice de variance-covariance <math>\Sigma = \frac{1}{n} \sum_{i=1}^n  U_{ci} U_{ci}^T</math>
 +
 +
 +
 +
donc <math>I_{\Delta_1^*} =  a_1^T \Sigma a_1</math>
 +
 +
 +
et <math>\parallel \overrightarrow{G_{a_1}} \parallel = a_1^T a_1 = 1</math> (vecteur unitaire)
 +
 +
 +
D'où la recherche du maximum : trouver <math>a_1</math> tel que <math>a_1^T \Sigma a_1</math> soit maximum (recherche l'optimum d'une fonction à plusieurs variables)
 +
 +
<math>g(a_1) = g( a_{11}, a_{12}, ..., a_{1p}) = a_1^T \Sigma a_1 - \lambda_ç1(a_1^Ta_1 -1) </math>
 +
 +
 +
<math>\rightarrow</math> d'après la méthode des multiplicateurs de Lagrange
 +
 +
<math>\rightarrow</math> dérivées partielles de <math>g(a_1)</math>, en utilisant la dérivée matricielle
 +
 +
<math>\frac{\partial g(a_1)}{\partial a_1} = 2 \Sigma a_1 - 2 \lambda_1a_1 = 0</math>
 +
 +
 +
donc
 +
 +
<math>
 +
\begin{cases}
 +
2 \Sigma a_1 - 2 \lambda_1a_1 = 0 \rightarrow \Sigma a_1 - \lambda_1 a_1 = 0 (1)\\
 +
a_1^T a_1 - 1 = 0 (2)\\
 +
\end{cases}
 +
</math>
 +
 +
 +
<math>(1) \leftrightarrow A x = \lambda x</math> ou <math>\Sigma a_1 = \lambda_1 a_1</math> d'où <math>a_1</math> vecteur propre de <math>\Sigma</math> associé à la valeur propre <math>\lambda_1</math>
 +
 +
 +
En multipliant à gauche par <math>a_1^T</math> on a
 +
 +
<math>a_1^T \Sigma a_1 = a_1^T \lambda_1 a_1 = \lambda_1 a_1^T a_1</math> avec <math>(2)</math> on <math> = I_{\Delta_1^*}</math> que l'on cherche à maximiser.
 +
 +
 +
Donc <math>\lambda_1</math> est la plus grande valeur propre de la matrice <math>\Sigma</math> et <math>\lambda_1 = I_{\Delta_1^*}</math>

Current revision as of 09:34, 8 October 2018

Contents

Analyse en composantes principales

Objectif : Réduire le nombre de dimensions de l'espace d'observation = obtenir une projection en perdant un minimum d'informations.

Applications :

  • grand nombre de variables que l'on cherche à visualiser en 2 à 3 dimensions
  • dessin de graphes

\Rightarrow Principe : trouver les axes sur lesquels on a un maximum de dispersion = plus de représentativité / moins de perte d'informations

Choix de l'origine

Prendre le centre de gravité du nuage.

Données :

  • u \rightarrow individus \rightarrowpoints dans l'espace à p dimensions.
  • v \rightarrow variables

X = \begin{matrix}
u_1  \\
u_2 \\
\vdots \\
u_n \end{matrix}
\overset{ \begin{matrix}\\v_1 & v_2 & \cdots & v_p \end{matrix}}
{
 \begin{bmatrix}
 x_{1,1} & x_{1,2} & \cdots & x_{1,p} \\
 x_{2,1} & x_{2,2} & \cdots & x_{2,p} \\
 \vdots & \vdots & \ddots & \vdots \\
 x_{n,1} & x_{n,2} & \cdots & x_{n,p} \end{bmatrix} 
}


Centre de gravité : \Sigma^n_{i=1} p_i \overrightarrow{Gu_i} = \overrightarrow{0} avec pi le poids de chaque dimension



G = \begin{pmatrix}
\frac{1}{n} \sum_{i=1}^n x_{i1} \\
\frac{1}{n} \sum_{i=1}^n x_{i2} \\
\vdots \\
\frac{1}{n} \sum_{i=1}^n x_{ip}
\end{pmatrix}
= \begin{pmatrix}
x_{\bullet 1} \\
x_{\bullet 2} \\
\vdots \\
x_{\bullet p}
\end{pmatrix}


On prendra G comme nouvelle origine.

\rightarrow données centrées


X_c = \begin{matrix}
u_{c1}  \\
u_{c2} \\
\vdots \\
u_{cn} \end{matrix}
\begin{bmatrix}
 x_{1,1} - x_{\bullet 1} & x_{1,2} - x_{\bullet 2} & \cdots & x_{1,p} - x_{\bullet p} \\
 x_{2,1} - x_{\bullet 1} & x_{2,2} - x_{\bullet 2} & \cdots & x_{2,p} - x_{\bullet p}  \\
 \vdots & \vdots & \ddots & \vdots \\
 x_{n,1} - x_{\bullet 1} & x_{n,2} - x_{\bullet 2} & \cdots & x_{n,p} - x_{\bullet p}  
\end{bmatrix}

Mesure de dispersion : Inertie

Inertie par rapport à un point (le centre de gravité)

I_G = \frac{1}{n} \sum_{i=1}^n d^2(G, u_i) = \frac{1}{n}\sum_{i=1}^n \sum_{j=1}^p (x_{ij} - x_{\bullet j})^2
= \sum_{j=1}^p \frac{1}{n}\sum_{i=1}^n (x_{ij} - x_{\bullet j})^2

avec \frac{1}{n}\sum_{i=1}^n (x_{ij} - x_{\bullet j})^2 = Var(v_j)

on a I_G = \sum_{j=1}^p  Var(v_j)

\Rightarrow L'inertie par rapport au centre de gravité revient à la somme des variances de chaque variable

Inertie par rapport à un axe

I_\Delta = \frac{1}{n}\sum_{i=1}^n d^2(h_{\Delta i}, u_i)

\rightarrow mesure la proximité du nuage des individus à l'axe.

Image:projection.orthogonale.png

Inertie par rapport à un sous-espace vectoriel

I_V = \frac{1}{n} \sum_{i=1}^n d^2(h_{Vi}, u_i) C'est pareil.

Décomposition de l'inertie totale

V * le complémentaire orthogonal de V

Image:inertie.portee.par.l.axe.png

on a I_G = I_{V} + I_{V^*}

En projetant sur V, on perd l'inertie mesurée par IV et il ne reste plus que celle mesurée par I_{V^*}


Recherche de Δ1 passant par G d'inertie minimum

maximise \Delta_1^* avec \overrightarrow{Ga_1} vecteur unitaire de \Delta_1^*


d^2(G, h_{\Delta_1^*i}) = \langle \overrightarrow{Gu_i}, \overrightarrow{Ga_1} \rangle ^2 
= a_1^T U_{ci} U_{ci}^T a_1


donc I_{\Delta_1^*} = \frac{1}{n} \sum_{i=1}^n  a_1^T U_{ci} U_{ci}^T a_1
= a_1^T \frac{1}{n} \sum_{i=1}^n  U_{ci} U_{ci}^T a_1


on reconnaît la matrice de variance-covariance \Sigma = \frac{1}{n} \sum_{i=1}^n  U_{ci} U_{ci}^T


donc I_{\Delta_1^*} =   a_1^T \Sigma a_1


et \parallel \overrightarrow{G_{a_1}} \parallel = a_1^T a_1 = 1 (vecteur unitaire)


D'où la recherche du maximum : trouver a1 tel que a_1^T \Sigma a_1 soit maximum (recherche l'optimum d'une fonction à plusieurs variables)

g(a_1) = g( a_{11}, a_{12}, ..., a_{1p}) = a_1^T \Sigma a_1 - \lambda_ç1(a_1^Ta_1 -1)


\rightarrow d'après la méthode des multiplicateurs de Lagrange

\rightarrow dérivées partielles de g(a1), en utilisant la dérivée matricielle

\frac{\partial g(a_1)}{\partial a_1} = 2 \Sigma a_1 - 2 \lambda_1a_1 = 0


donc


\begin{cases}
2 \Sigma a_1 - 2 \lambda_1a_1 = 0 \rightarrow \Sigma a_1 - \lambda_1 a_1 = 0 (1)\\
a_1^T a_1 - 1 = 0 (2)\\
\end{cases}


(1) \leftrightarrow A x = \lambda x ou Σa1 = λ1a1 d'où a1 vecteur propre de Σ associé à la valeur propre λ1


En multipliant à gauche par a_1^T on a

a_1^T \Sigma a_1 = a_1^T \lambda_1 a_1 = \lambda_1 a_1^T a_1 avec (2) on  = I_{\Delta_1^*} que l'on cherche à maximiser.


Donc λ1 est la plus grande valeur propre de la matrice Σ et \lambda_1 = I_{\Delta_1^*}