s xxx d - cs.utah.edujeffp/teaching/cs5140-s19/cs5140/l10-n… · l10: spectral clustering je↵m....

17
L10: Spectral Clustering JeM. Phillips February 13, 2019 Input . X , d : Xxx - IR S : Xxx - Co. D I . Hierarchical AC bottom - up 2 . Assignment - based 3. * " I :L 'd .wn a.) Icm

Upload: others

Post on 19-Oct-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

L10: Spectral Clustering

Je↵ M. Phillips

February 13, 2019

Input . X,

d : Xxx - IR

S : Xxx - Co. D

I. Hierarchical AC

bottom - up

2.

Assignment - based

3. * " I:L'd .wn

a.)

Icm

Page 2: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Graphsa

b

c

d

e

f

g

h

Mathematically: G = (V ,E ) where

V = {a, b, c , d , e, f , g} and

E =n

{a, b}, {a, c}, {a, d}, {b, d}, {c , d}, {c , e}, {e, f }, {e, g}, {f , g}, {f , h}o

.

Matrix-Style: As a matrix with 1 if there is an edge, and 0 otherwise.(For a directed graph, it may not be symmetric).

G =

a b c d e f g ha 0 1 1 1 0 0 0 0b 1 0 0 1 0 0 0 0c 1 0 0 1 1 0 0 0d 1 1 1 0 0 0 0 0e 0 0 1 0 0 1 1 0f 0 0 0 0 1 0 1 1g 0 0 0 0 1 1 0 0h 0 0 0 0 0 1 0 0

=

0

BBBBBBBBBB@

0 1 1 1 0 0 0 01 0 0 1 0 0 0 01 0 0 1 1 0 0 01 1 1 0 0 0 0 00 0 1 0 0 1 1 00 0 0 0 1 0 1 10 0 0 0 1 1 0 00 0 0 0 0 1 0 0

1

CCCCCCCCCCA

Page 3: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Graphsa

b

c

d

e

f

g

h

Mathematically: G = (V ,E ) where

V = {a, b, c , d , e, f , g} and

E =n

{a, b}, {a, c}, {a, d}, {b, d}, {c , d}, {c , e}, {e, f }, {e, g}, {f , g}, {f , h}o

.

Matrix-Style: As a matrix with 1 if there is an edge, and 0 otherwise.(For a directed graph, it may not be symmetric).

G =

a b c d e f g ha 0 1 1 1 0 0 0 0b 1 0 0 1 0 0 0 0c 1 0 0 1 1 0 0 0d 1 1 1 0 0 0 0 0e 0 0 1 0 0 1 1 0f 0 0 0 0 1 0 1 1g 0 0 0 0 1 1 0 0h 0 0 0 0 0 1 0 0

=

0

BBBBBBBBBB@

0 1 1 1 0 0 0 01 0 0 1 0 0 0 01 0 0 1 1 0 0 01 1 1 0 0 0 0 00 0 1 0 0 1 1 00 0 0 0 1 0 1 10 0 0 0 1 1 0 00 0 0 0 0 1 0 0

1

CCCCCCCCCCA

q - -

O

Page 4: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Graphsa

b

c

d

e

f

g

h

Mathematically: G = (V ,E ) where

V = {a, b, c , d , e, f , g} and

E =n

{a, b}, {a, c}, {a, d}, {b, d}, {c , d}, {c , e}, {e, f }, {e, g}, {f , g}, {f , h}o

.

Matrix-Style: As a matrix with 1 if there is an edge, and 0 otherwise.(For a directed graph, it may not be symmetric).

G =

a b c d e f g ha 0 1 1 1 0 0 0 0b 1 0 0 1 0 0 0 0c 1 0 0 1 1 0 0 0d 1 1 1 0 0 0 0 0e 0 0 1 0 0 1 1 0f 0 0 0 0 1 0 1 1g 0 0 0 0 1 1 0 0h 0 0 0 0 0 1 0 0

=

0

BBBBBBBBBB@

0 1 1 1 0 0 0 01 0 0 1 0 0 0 01 0 0 1 1 0 0 01 1 1 0 0 0 0 00 0 1 0 0 1 1 00 0 0 0 1 0 1 10 0 0 0 1 1 0 00 0 0 0 0 1 0 0

1

CCCCCCCCCCA

a E Co , D

I eg. . 0=0.2m E n

Z

M = nLtd

1vl=n let -

- m00

Page 5: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

NCotcsh-f-gt.tl

b -d

v oster ing vous' ) - I Tµco#C split )

=÷ +¥-0.39= S and T - VIS

Coffs ) = # edges betweenve S and

u' ET

Vol ( s ) = # edges EEE sit .

at least one endpointNot # =

sins.

Page 6: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Laplacian Matrix

a

b

c

d

e

f

g

h

adjacency diagonal

A =

0

BBBBBBBBB@

0 1 1 1 0 0 0 01 0 0 1 0 0 0 01 0 0 1 1 0 0 01 1 1 0 0 0 0 00 0 1 0 0 1 1 00 0 0 0 1 0 1 10 0 0 0 1 1 0 00 0 0 0 0 1 0 0

1

CCCCCCCCCA

D =

0

BBBBBBBBB@

3 0 0 0 0 0 0 00 2 0 0 0 0 0 00 0 3 0 0 0 0 00 0 0 3 0 0 0 00 0 0 0 3 0 0 00 0 0 0 0 3 0 00 0 0 0 0 0 2 00 0 0 0 0 0 0 1

1

CCCCCCCCCA

.

- e

- DEE

,

t O

Page 7: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Unnormalized Laplacian Matrix

a

b

c

d

e

f

g

h

L0 = D � A =

0

BBBBBBBBB@

3 �1 �1 �1 0 0 0 0�1 2 0 �1 0 0 0 0�1 0 3 �1 �1 0 0 0�1 �1 �1 3 0 0 0 00 0 �1 0 3 �1 �1 00 0 0 0 �1 3 �1 �10 0 0 0 �1 �1 2 00 0 0 0 0 �1 0 1

1

CCCCCCCCCA

.

IT

o

Page 8: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

eigenvectorsof L,

u

Lv = du d scalar

eigenvalue

if hull = I

Page 9: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Unnormalized Laplacian Matrix

a

b

c

d

e

f

g

h

eigenvectors of L0

� 0 0.278 1.11 2.31 3.46 4 4.82V 1/

p8 �.36 0.08 0.10 0.28 0.25 1/

p2

1/p8 �.42 0.18 0.64 �.38 0.25 0

1/p8 �.20 �.11 0.61 0.03 �.25 0

1/p8 �.36 0.08 0.10 0.28 0.25 �1/

p2

1/p8 0.17 �.37 0.21 �.54 �.25 0

1/p8 0.36 �.08 �.10 �.28 0.75 0

1/p8 0.31 �.51 �.36 �.56 0.56 0

1/p8 0.50 0.73 0.08 0.11 0.11 0

" - eight

:#

Page 10: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Unnormalized Laplacian Matrixa

b

c

d

e

f

g

h

� 0.278 1.11V �.36 0.08 a

�.42 0.18 b�.20 �.11 c�.36 0.08 d0.17 �.37 e0.36 �.08 f0.31 �.51 g0.50 0.73 hv2 v3

ab

cd

e

f

g

h

v3 = 1

v3 = �1

v2 = �1 v2 = 1

Vzli )

Its

X - axis Vz Li )

In

Page 11: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Laplacian Matrix

a

b

c

d

e

f

g

h

D�1/2 =

0

BBBBBBBBB@

0.577 0 0 0 0 0 0 00 0.707 0 0 0 0 0 00 0 0.577 0 0 0 0 00 0 0 0.577 0 0 0 00 0 0 0 0.577 0 0 00 0 0 0 0 0.577 0 00 0 0 0 0 0 0.707 00 0 0 0 0 0 0 1

1

CCCCCCCCCA

.

ANormalized

= fi"

ni "

..

.

Page 12: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Laplacian Matrix

a

b

c

d

e

f

g

h

normalized Laplacian

L = I � D�1/2AD�1/2 =

0

BBBBBBBBB@

1 �0.408 �0.333 �0.333 0 0 0 0�0.408 1 0 �0.408 0 0 0 0�0.333 0 1 �0.333 �0.333 0 0 0�0.333 �0.408 �0.333 1 0 0 0 0

0 0 �0.333 0 1 �0.333 �0.408 00 0 0 0 �0.333 1 �0.408 �0.5770 0 0 0 �0.408 �0.408 1 00 0 0 0 0 �0.577 0 1

1

CCCCCCCCCA

.

D- ' " ( Lo ) " KD - A)15 "

Page 13: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Laplacian Matrix

a

b

c

d

e

f

g

h

eigenvectors of L

� 0 0.125 0.724 1.00 1.33 1.42 1.66 1.73V �.39 0.38 �.09 0.00 0.71 0.26 �.32 0.16

�.32 0.36 �.27 0.50 0.00 �.51 0.38 �.18�.39 0.18 0.36 �.61 0.00 0.03 0.47 �.29�.39 0.38 �.09 0.00 �.71 0.26 �.32 0.16�.39 �.28 0.48 0.00 0.00 �.57 0.31 0.33�.39 �.48 �.29 0.00 0.00 0.05 �.31 �.65�.31 �.36 0.27 0.50 0.00 0.51 0.38 �.18�.22 �.32 �.61 �.35 0.00 �.07 0.27 0.51

Page 14: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Laplacian Matrix

a

b

c

d

e

f

g

h

eigenvectors of L

� 0 0.125 0.724 1.00 1.33 1.42 1.66 1.73V �.39 0.38 �.09 0.00 0.71 0.26 �.32 0.16

�.32 0.36 �.27 0.50 0.00 �.51 0.38 �.18�.39 0.18 0.36 �.61 0.00 0.03 0.47 �.29�.39 0.38 �.09 0.00 �.71 0.26 �.32 0.16�.39 �.28 0.48 0.00 0.00 �.57 0.31 0.33�.39 �.48 �.29 0.00 0.00 0.05 �.31 �.65�.31 �.36 0.27 0.50 0.00 0.51 0.38 �.18�.22 �.32 �.61 �.35 0.00 �.07 0.27 0.51

D

Page 15: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Laplacian Matrix

a

b

c

d

e

f

g

h

� 0.125 0.724V 0.38 �.09 a

0.36 �.27 b0.18 0.36 c0.38 �.09 d�.28 0.48 e�.48 �.29 f�.36 0.27 g�.32 �.61 hv2 v3

ab

c

d

e

f

g

h

v3 = 1

v3 = �1

v2 = �1 v2 = 1

Page 16: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

Similarity 5 i X

A Axn matrix" affinity "

Ai;

= ski ,x ;)

Page 17: S Xxx D - cs.utah.edujeffp/teaching/cs5140-S19/cs5140/L10-n… · L10: Spectral Clustering Je↵M. Phillips February 13, 2019 Input. X, d: Xxx-IR S: Xxx-Co. D I. Hierarchical AC bottom-up

i

€\