• Aucun résultat trouvé

• m ´ethode de base: ACP

N/A
N/A
Protected

Academic year: 2022

Partager "• m ´ethode de base: ACP"

Copied!
25
0
0

Texte intégral

(1)

• Typologie de la r ´eduction de dimension

• m ´ethode de base: ACP

• “groupement (clustering) des dimensions”

• extensions:

• ACP non-lin ´eaire (NLPCA)

• ´echelonnement multidimensionnel (multidimensional scaling – MDS)

• cartes auto-organisatrices (self-organizing maps – SOM)

• local linear embedding (LLE)

• ISOMAP

• courbes principales (principal curves)

(2)

• Typologie de groupement (clustering)

• m ´ethode de base: k-moyennes

• groupement (clustering) des points

• extensions:

• k-moyennes flou (fuzzy k-means) ≡ SOM

• densit ´es du m ´elange ⊆ k-moyennes flou

• groupement hi´erarchique (hierarchical clustering)

(3)

• Densit ´es du m ´elange

• mod `ele semi-param ´etrique:

p(x | ! ) = "

k

!=1

p(x | C

!

, !

!

)P( C

!

)

k classes

• vecteur des param `etres: ! = ( !

1

, . . ., !

k

)

• densit ´es de composante: p(x | C

!

, !

!

)

• probabilit ´es a-priori (param `etres du m ´elange): P(C

!

)

• Objectif

• estimer ! , (P(C

!

)) ´etant donn ´e X

n

= { X

1

, X

2

, . . . , X

n

}

(4)

• Approche de maximum de vraisemblance

p( X

n

| ! ) = #

n

i=1

p(x

i

| ! )

l = "

n

i=1

log p(x

i

| ! )

!

!!

l = "

n

i=1

1

p(x

i

| ! ) !

!!

!

k

"

j=1

p(x

i

| C

j

, !

j

)P(C

j

)

"

= "

n

i=1

P( C

!

| x

i

, ! ) !

!!

log p(x

i

| C

!

, !

!

) = 0

• o `u P(C

!

| x

i

, ! ) = p(x

i

| C

!

, !

!

)P(C

!

)

p(x

i

| ! )

(5)

• Algorithme it ´eratif

D ENSIT ES ´ D U M ´ ELANGE ( X

n

) 1 !

(0)

← #

!

(0)1

, . . ., !

(0)k

$

, j ← 0 2 faire

3 pour ! ← 1 `a k faire 4 pour i ← 1 `a n faire

5 P

!,i(j)

= P(C

!

| x

i

, !

(j)

) ← p(x

i

| C

!

, !

(!j)

)P(C

!

) p(x

i

| !

(j)

) 6 pour ! ← 1 `a k faire

7 !

(!j+1)

solution

%

n

"

i=1

P

!,i(j)

!

!!

log p(x

i

| C

!

, !

!

) = 0

&

8 jj + 1 9 jusqu’`a '

1 −

l(lj+1)(j)

( < seuil

(6)

• k-moyennes flou (fuzzy k-means)

x

i

appartient `a V

!

avec un poids W

i,!

( ∼ P(C

!

| x

i

))

W

i,!

est normalis ´e pour tous les points x

i

:

k

"

!=1

W

i,!

= 1

• objectif: minimiser

J

fuz

= "

k

!=1 n

"

i=1

W

bi,!

& x

i

µ

!

&

2

(7)

• Solution (b > 1)

µ

!

= "

ni=1

W

bi,!

x

i

"

ni=1

W

bi,!

W

i,!

= (1/d

i!

)

1/(b1)

"

k!'=1

(1/d

i!'

)

1/(b1)

, (d

i!

= & x

i

µ

!

&

2

)

• algorithme it ´eratif

(8)

• Normalisation

.2 .4 .6 .8 1

0 .2 .4 .6 .8 1

.25 .5 .75 1 1.25 1.5 1.75 2

0 .1 .2 .3 .4 .5

.1 .2 .3 .4 .5 0

.2 .4 .6 .8 1 1.2 1.4 1.6

2 00 .5

( )

x2

x2

x2

x1

x1

x1

.5 0

( )

0 2

(9)

• Normalisation

x

1

x

1

x

2

x

2

(10)

• Crit `eres diff ´erents

• m ´etrique de Minkowski:

d(x, x

'

) = )

d

"

i=1

| x

i

x

'i

|

p

*

1/p

• mesures de similarit ´e:

s(x, x

'

) = x

t

x

'

& x & & x

'

&

x

t

x

'

est le nombre des attributs partag´es (variables binaires)

• & x & & x

'

& est la moyenne g´eom ´etrique des attributs poss´ed ´es par x et x

'

s(x, x

'

): possession relative des attributs

(11)

• Crit `eres diff ´erents

• versions diff ´erentes:

• fraction des attributs partag´es: s(x, x

'

) = x

t

x

'

d

• distance de Tanimoto: s(x, x

'

) = x

t

x

'

x

t

x + x

't

x

'

x

t

x

'

(12)

• Crit `eres diff ´erents

• m ´etrique quadratique:

J

e

= "

c

i=1

"

x

V

i

& x

i

v

i

&

2

= 1 2

c

"

i=1

n

i

s

i

• o `u s

i

= 1 n

2i

"

x

V

i

"

x'

V

i

& xx

'

&

2

• g ´en ´eralisations:

s

i

= 1 n

2i

"

x

V

i

"

x'

V

i

s(x, x

'

) s

i

= max

x,x'

V

i

s(x, x

'

)

(13)

• Groupement hi ´erarchique

• dendogramme:

0 10 20 30 40 50 60 70 80 90

x

1

100 k = 1

k = 2 k = 3 k = 4 k = 5 k = 6 k = 7

x

2

x

3

x

4

x

5

x

6

x

7

x

8

k = 8

´ec helle de similarit ´e

(14)

• Groupement hi ´erarchique agglom ´eratif

G ROUPEMENT H IERARCHIQUE A GGLOMERATIF ( X

n

, c) 1 + cn

2 pour i ← 1 `a n faire 3 V

i

← { x

i

}

4 faire

5 trouver les groupes les plus proches V

i

et V

j

6 fusionner V

i

et V

j

7 c + ← + c − 1

8 jusqu’`a c = + c

(15)

• Distances des groupes

d

min

(V

i

, V

j

) = min

xVi x'Vj

& xx

'

&

d

max

(V

i

, V

j

) = max

xVi x'Vj

& xx

'

&

d

avg

(V

i

, V

j

) = 1 n

i

n

j

"

xVi

"

x'Vj

& xx

'

&

d

mean

(V

i

, V

j

) = &

i

j

&

(16)

• Groupement hi ´erarchique – plus proche voisin

d

min

(V

i

, V

j

) = min

xVi x'Vj

& xx

'

&

• algorithme du lien simple (single-linkage)

• arbre couvrant minimal (Kruskal)

(17)

• Groupement hi ´erarchique – plus proche voisin

(18)

• Groupement hi ´erarchique – plus loin voisin

d

max

(V

i

, V

j

) = max

xVi x'Vj

& xx

'

&

• algorithme du lien complet (complete linkage)

• augmenter le diam `etre le moins possible

(19)

• Groupement hi ´erarchique – plus loin voisin

d

max

= large d

max

= small

(20)

• Groupement hi ´erarchique incr ´ementiel

G ROUPEMENT H IERARCHIQUE I NCREMENTIEL ( X

n

, c) 1 + cn

2 pour i ← 1 `a n faire 3 V

i

← { x

i

}

4 faire

5 trouver V

i

et V

j

dont la fusion change une crit`ere le moins 6 fusionner V

i

et V

j

7 c + ← + c − 1 8 jusqu’`a c = + c

• crit `ere: J

e

= "

c

i=1

"

xVi

& x

i

&

2

• distance: d

e

( V

i

,V

j

) = , n

i

n

j

n

i

+ n

j

&

i

j

&

(21)

• Groupement hi ´erarchique – approche de th ´eorie de graphe

• Matrice (graphe) de similarit ´e S i j =

% 1 si d (x i , x j ) < d 0 0 sinon.

d

min

−→ composantes connexes

d

max

−→ sous-graphes complets

• Approche de division

• Statistique de longueurs des arr ˆetes

• Chemin de diam `etre

(22)

• Groupement hi ´erarchique – approche de division

• construire un arbre couvrant minimal

• couper les arr ˆetes “longues”

(23)

• Groupement hi ´erarch. – statistique de longueurs des arr ˆetes

1 2 3 4 5 6 7 8 9

1 2 3 4 5 6 7 8 9

longueur longueur

nombr e

nombr e

(24)

• Groupement hi ´erarchique – m ´etrique g ´en ´er ´ee

• $ (x, x

'

) “dissimilarit ´e” non-m ´etrique

• non-n´egativit ´e: $(x, x

'

) ≥ 0

• r ´eflexivit ´e: $(x, x

'

) = 0 sii x = x

'

• “dissimilarit ´e” des groupes

• $

min

(V

i

,V

j

) = min

xVi x'Vj

$ (x, x

'

)

• $

max

(V

i

,V

j

) = max

xVi x'Vj

$ (x, x

'

)

d(x, x

'

) m ´etrique g ´en ´er ´ee:

• le niveau de groupement plus bas o `u x et x

'

se trouvent dans le mˆeme groupe

• aussi sym ´etrique et satisfait l’in´egalit ´e de triangle

(25)

• Groupement hi ´erarchique – dans l’espace des attributs

• trouver les attributs les plus corr ´el ´es

• matrice de covariance: R = [ %

i j

]

• coefficients de corr ´elation: &

i j

= %

i j

%

ii

%

j j

• 0 ≤ &

i j

≤ 1: mesure de similarit ´e entre deux attributs

Références

Documents relatifs

(b) A chaque étape de l'algorithme, choisir arbitrairement un sommet en dehors de ceux qui ont déjà été retenus dans la construction, et relier par l'arête de poids le plus faible,

d’une phase décisionnelle, c’est-à-dire une fois l’arbre construit à partir de données standard, comme c’est le cas par exemple dans (Quinlan 90); d’autre

Our algorithm uses the GHS approach to merge the fragments using minimum outgoing edges to construct a spanning tree, and deletes the edge of maximum weight in each fundamental cycle

L’objet de ce TP est de générer une marche aléatoire à boucles effacées sur un graphe, puis d’implémenter l’algorithme de Wilson qui permet d’en déduire un arbre

Vous implémenterez en C un algorithme de Prim en vous inspirant éventuellement du canevas proposé ci-après... Activité supplémentaire : Kruskal sur

ajouter la meilleure arˆete possible le graphe restant une forˆet. 2 Principe de l’algorithme de

Si G est un arbre ayant au moins deux sommets, alors G admet au moins deux sommets de degr´e

(f) Trouver un algorithme plus rapide que celui de Dijkstra pour trouver les plus court chemins et leur longueur ` a partir d’un sommet u donn´ e dans un graphe non-pond´ er´