SlideShare a Scribd company logo
1 of 49
Download to read offline
Jeonghun Yoon
K-means clustering을 이용하여, (또는, 유클리디안 공간 위의 데이터의
집합을 나눌 때 사용하는 clustering 알고리즘을 이용하여) 위의 objects을
𝐾개의 집단으로 나누어 보자.
각각의 objects은 유클리디안 공간의 데이터로 mapping 된다.
그리고 각각의 데이터는 20차원의 실수로 된 특성 벡터(feature vector)라고
가정해 보자.
K-means 알고리즘을 돌릴 때 마다, 모든 데이터와 centroids의 거리(similarity)가
계산된다.
(1, 2, 3, 10, 8, -3, -8, 9, 10, 5, 0, 12, -9, 8, 1, 1000, 3, 987, 38, 10)
(-80, 32, 13, 1, 0, 0, -8, 91, 1, 15, 20, 32, 1, -98, 3, 1, 3000, 1876, 3, -11)
.............................
.............................
.............................
이처럼, 각각의 데이터가 20차원의 특성 벡터라면, 데이터를 다루거나 저장하기가
간편하지 않다.
즉, objects을 특성벡터를 가진 데이터로 변환하게 되면, 데이터를 다루기가 쉽지
않은 상황이 발생 할 가능성이 있다.
Clustering에서 중요한 것은, 데이터간의 similarity이다.
데이터 개개인의 물리량보다 데이터간의 similarity에 집중할 수 있는 방법이
없을까?
1
2
8
7
7
1.6
0.5
4
2
2.5
데이터 자체 보다, 데이터 사이의 관계(similarity)에 더 집중하는 방법은 Graph를
통해서 달성 될 수 있다.
1
2
8
7
7
1.6
0.5
4
2
2.5
1
2
8
7
7
1.6
0.5
4
2
2.5
V1
V2
V3
V4
V3
graph networks 위에서
clustering을 수행하자.
여기서 주의할 것은, graph를 이용한 clustering이, 유클리디안 공간 위의 데이터에
대한 clustering의 대안으로 발견된 것이 아니라는 것이다.
graph를 이용한 clustering과 유클리디안 공간 위의 데이터에 대한 clustering은
각각 장단점이 있다.
graph를 이용한 clustering이, 후자에 대한 단점을 극복할 수 있는 장점이
있을 수 있으나, 후자를 대체하는 기법이라고 생각해서는 안 된다.
grpah를 이용한 clustering은 데이터 개개인 자체의 물리량 보다는 데이터간의
관계(similarity)에 집중 할 수 있다는 장점이 있다.
또한, 수학의 역사에서 오랜 부분 발전해 온 다양한 graph theory의 도움을 받아서,
objects을 graph 구조로 변환 시킨다면, 다양한 이슈(clustering, web mining, community
detection 등)를 비교적 손쉽게 해결 할 수 있다는 장점이 있다.
문제 : 위의 objects을 graph를 이용하여 clusters로 나누어라!
Step 1 : Data를 Graph 구조로 변형(transformation)
Step 2 : Graph Partitioning 또는 Graph Clustering 수행
 𝑛개의 data 𝑋1, … , 𝑋 𝑛과 data사이의 similarity(유사도) 𝑊 𝑋𝑖, 𝑋𝑗 , 𝑖, 𝑗 ∈ {1, … , 𝑛} 가
주어졌을 때, data를 그룹(clusters)로 나누어라(partition). 단, 같은 그룹 안의 data
사이는 유사함이 높고(similar / higher similarity), 서로 다른 그룹의 data 사이는
유사함이 낮다(dissimilar / lower similarity).
 𝑛개의 node(vertex)와 edge weight 𝑊𝑖𝑗 , 𝑖, 𝑗 ∈ {1, … , 𝑛}를 가진 Graph를 그룹
(clusters)로 나누어라(partition). 이 때, 같은 그룹 안에 존재하는 node(vertex) 사
이의 edge weight는 높아야 하며, 다른 그룹의 node(vertex) 사이의 edge weight
는 낮아야 한다.
 Graph
○ Graph는 vertex(node)와 edge의 집합이다. 2개의 vertex는 edge로 연결 될 수 있다.
○ 𝑉를 vertex의 집합이라 하고, 𝐸를 edge의 집합이라고 할 때, graph 𝐺 = (𝑉, 𝐸)이다.
○ degree of node
① 특정 node에 연결 된 edge의 수
ex) node 1의 degree : 3, node 6의 degree : 1
vertex
edge
 Undirected graph
○ Edge의 방향이 존재하지 않는다.
 Directed graph
○ Edge이 방향이 존재한다.
degree : 2
in degree : 2
out degree : 1
Step 1 : Data를 Graph 구조로 변형(transformation)
Step 1 : Data를 Graph 구조로 변형(transformation)
𝑑1, 𝑑2는 similarity(유사도)가 높다. similarity가 높으면,
graph에서 높은 edge weight를 가지게 된다. 예를 들어 𝑊 𝑣1, 𝑣2 = 5
𝑑2
𝑑1
𝑑3
𝑑2 𝑑3는 similarity(유사도)가 낮다. similarity가 낮으면,
graph에서 낮은 edge weight를 가지게 된다. 예를 들어 𝑊 𝑣2, 𝑣3 = 1
𝑣3
𝑣2
data set
similarity graph
𝑣1
 Similarity Graph 𝐺(𝑉, 𝐸, 𝑊)
○ 𝑉 - vertices or nodes (data points)
○ 𝐸 - edge if similarity > thresholds(경계 값)
○ 𝑊 - edge weights (similarities)
data set
similarity graph
𝑑2
𝑑3
𝑑1
𝑑5
𝑑6
𝑑4
𝑑8
𝑑9
𝑑7
𝑣2
𝑣3
𝑣1
𝑣5
𝑣6
𝑣4
𝑣8
𝑣9
𝑣7
𝑣1
𝑣2
𝑣3
𝑣4
𝑣5
𝑣6
𝑣7
𝑣8
𝑣9
𝑣1 𝑣2 𝑣3 𝑣4 𝑣5 𝑣6 𝑣7 𝑣8 𝑣9
similarity matrix
 Similarity graph construction
○ data point를 graph의 node로 대응시키고, data point 사이의 similarity를 가지고
node 사이의 edge를 생성(construction)할 때, edge가 존재하는지 안 하는지, 더 나아
가 edge의 weight가 얼마인지를 결정하는 방법은 다양하다.
① 𝜖-Nearest Neighbor
– 𝑊𝑖𝑗 = 1 if 𝕩𝑖 − 𝕩𝑗 ≤ 𝜖
– 𝑊𝑖𝑗 = 0 if otherwise
② 𝐾-Nearest Neighbor
– 𝑊𝑖𝑗 = 1 if 𝕩𝑖 or 𝕩𝑗 is 𝑘 nearest of the other.
– 𝑊𝑖𝑗 = 0 if otherwise
③Gaussian kernel similarity function
– 𝑊𝑖𝑗 = 𝑒
𝕩 𝑖−𝕩 𝑗
2𝜎2
𝕩𝑖
𝕩𝑗
ex) 3-NN
Step 2 : Graph Partitioning 또는 Graph Clustering 수행
How to partition a graph into 𝟐 clusters?
(먼저, graph를 두 개의 cluster로 나누는 graph cut을 생각해 보자.)
 Graph cut
○ graph를 두 개의 vertices의 set 𝐴, 𝐵로 나눈다고 할 때, 각각의 set 𝐴와 set 𝐵를 cut이라
고 한다.
○ graph를 두 개의 vertices의 set 𝐴, 𝐵로 나눈다고 할 때, set 𝐴안에 있는 vertices에서 set
𝐵안에 있는 vertices로 연결된 edge의 weight들의 합을 cut의 size라고 한다.
𝑐𝑢𝑡 𝐴, 𝐵 = ෍
𝑖∈𝐴,𝑗∈𝐵
𝑤𝑖𝑗
 Min-cut problem
○ graph를 두 개의 set 𝐴, 𝐵로 나누어라. 단, set 𝐴안에 있는 vertices에서 set 𝐵안에 있는
vertices로 연결된 edge의 weight들의 합이 최소가 되게 하라.
min 𝑐𝑢𝑡 𝐴, 𝐵 = ෍
𝑖∈𝐴,𝑗∈𝐵
𝑤𝑖𝑗
빨간색 edges의 weight의 합을
최소로 만들자!
○ Min-cut problem을 풀 때의 문제점
①때때로 고립 된 vertex를 선택한다.
②따라서, cut에 의하여 나눠 지는 set 𝐴, 𝐵에 대한 제약 조건이 필요하다.
이상적인 cut
그러나, 이상적인 cut
보다 낮은 weight를
가지고 있는 cut을
선택하게 된다.
 Min-cut problem
○ graph를 두 개의 set 𝐴, 𝐵로 나누어라. 단, set 𝐴안에 있는 vertices에서 set 𝐵안에 있는
vertices로 연결된 edge의 weight들의 합이 최소가 되게 하라. 그리고 set 𝐴와 set 𝐵의
크기(size)를 매우 비슷하게 하라.
min 𝑐𝑢𝑡 𝐴, 𝐵 = ෍
𝑖∈𝐴,𝑗∈𝐵
𝑤𝑖𝑗 & 𝑠𝑖𝑧𝑒 𝑜𝑓 𝐴 𝑎𝑛𝑑 𝐵 𝑎𝑟𝑒 𝑣𝑒𝑟𝑦 𝑠𝑖𝑚𝑖𝑙𝑎𝑟.
○ set 𝐴와 set 𝐵의 크기(size)를 측정하는 서로 다른 두 가지 방법이 있다.
①|𝐴| := set 𝐴 에 속하는 vertices의 개수
② 𝑣𝑜𝑙(𝐴) := σ𝑖∈𝐴 𝑑𝑖 where 𝑑𝑖 = σ 𝑗=1
𝑛
𝑤𝑖𝑗
(𝑑𝑖가 의미하는 것은 vertex 𝑖에서 뻗어 나간 edges의 weight의 합)
𝒄𝒖𝒕 𝑨, 𝑩 가 작은 값을 갖기를 원한다.
+
𝑨의 size와 B의 size가 비슷하기를 원한다.
How?
예를 들어,
𝑐𝑢𝑡(𝐴,𝐵)
|𝐴|
를 생각해 보자.
𝑐𝑢𝑡(𝐴, 𝐵)
|𝐴|
분모가 작아 지고, 동시에 분자도 작아 지기 때문에
전체의 값은 빠르게 감소하지 않는다.
𝑐𝑢𝑡(𝐴, 𝐵)
|𝐴|
하지만 이 경우, 분모가 작아지고, 동시에 분자가 커지기 때문에
전체의 값은 빠르게 감소한다.
앞으로 cut의 크기를 정의 그대로의 𝒄𝒖𝒕(𝑨, 𝑩) 대신에 살짝 변형된
𝒄𝒖𝒕(𝑨,𝑩)
|𝒔𝒊𝒛𝒆 𝒐𝒇 𝒄𝒖𝒕|
의 합으로 정의하여 구하자.
○ Balanced Min-Cut
𝐦𝐢𝐧
𝑨,𝑩
𝒄𝒖𝒕(𝑨, 𝑩) 𝒔. 𝒕. 𝑨 = 𝑩
○ Ratio Cut
𝑹𝒂𝒕𝒊𝒐𝑪𝒖𝒕 𝑨, 𝑩 ≔ 𝒄𝒖𝒕 𝑨, 𝑩
𝟏
𝑨
+
𝟏
𝑩
①Ratio Cut의 크기는
𝑐𝑢𝑡(𝐴,𝐵)
|𝐴|
+
𝑐𝑢𝑡(𝐴,𝐵)
|𝐵|
이다.
②주어진 목적 함수(object function)의 최소값은 𝐴 = |𝐵| 일 때 성립한다.
왜냐하면
1
𝐴
+
1
𝐵
의 최소값은 𝐴 = |𝐵| 일 때 성립하기 때문이다.
○ Normalized Cut
𝑵𝑪𝒖𝒕 𝑨, 𝑩 ≔ 𝒄𝒖𝒕(𝑨, 𝑩)
𝟏
𝒗𝒐𝒍(𝑨)
+
𝟏
𝒗𝒐𝒍(𝑩)
①Normalized Cut의 크기는
𝑐𝑢𝑡(𝐴,𝐵)
𝑣𝑜𝑙(𝐴)
+
𝑐𝑢𝑡(𝐴,𝐵)
𝑣𝑜𝑙(𝐵)
이다.
②주어진 목적 함수(object function)의 최소값은 𝑣𝑜𝑙(𝐴) = 𝑣𝑜𝑙(𝐵) 일 때 성립한다.
왜냐하면
1
𝑣𝑜𝑙(𝐴)
+
1
𝑣𝑜𝑙(𝐵)
의 최소값은 𝑣𝑜𝑙(𝐴) = 𝑣𝑜𝑙(𝐵)일 때 성립하기 때문이다.
 Ratio Cut과 Normalized Cut을 계산하는 문제는 NP-Hard 문제이다. 즉
polynomial time안에 계산 할 수 없다.
 우리는 이것을 풀기 위해 relaxation(완화)를 사용할 것이다. 다음 페이지에서 살펴
보자.
 In mathematical optimization, a relaxation is an approximation of a difficult
problem by a nearby problem that is easier to solve. A solution of the relaxed
problem provides information about the original problem.
 Definition (minimization problem)
○ an minimization problem A, 𝑧 = min{𝑐 𝑥 : 𝑥 ∈ 𝑋 ⊆ ℝ 𝑛
}
○ another minimization problem B, 𝑧 𝑅 = min{𝑐 𝑅 𝑥 : 𝑥 ∈ 𝑋 𝑅 ⊆ ℝ 𝑛
}
○ B is a relaxation of A with two properties
① X ⊆ 𝑋 𝑅
② 𝑐 𝑅(𝑥) ≤ 𝑐(𝑥) for all 𝑥 ∈ 𝑋
 Properties (minimization problem)
○ 𝑥∗
가 original problem의 optimal solution이면, 𝑥∗
∈ 𝑋 ⊆ 𝑋 𝑅이고, 𝑧 𝑅 ≤ 𝑐 𝑅 𝑥∗
≤
𝑐 𝑥∗
= 𝑧
○ 1, 2의 가정에, 𝑐 𝑅 𝑥 = 𝑐 𝑥 , ∀𝑥 ∈ 𝑋의 가정이 더해지면, relaxed problem의 optimal
solution은 original problem에서 실현 가능한 해(feasible solution)이며, original
problem의 optimal solution이다.
Graph Cut을 수학적으로 표현해 보자!!
 Some graph notation
○ 𝑊 = (𝑤𝑖𝑗) adjacency matrix of the graph
①Graph의 vertex 𝑖, 𝑗 사이의 edge가 존재하면 matrix의 𝑖행 𝑗열에, 그 edge의
weight를 입력한다.
𝑊 =
○ 𝑑𝑖 = σ 𝑗 𝑤𝑖𝑗
①Vertex 𝑖의 degree를 의미한다. 즉, vertex 𝑖에 연결 된 edges의 weight의 합을 의
미한다.
○ Degree Matrix 𝐷 = 𝑑𝑖𝑎𝑔(𝑑1, … , 𝑑 𝑛)
𝐷 =
○ Laplacian Matrix
① graph를 표현하는 matrix
② 𝐿 = 𝐷 − 𝑊
③ 𝐿의 각 row의 합은 0이다.
– 𝐷의 𝑖 열의 𝑑𝑖 는 vertex 𝑖 의 degree
– 𝑊의 𝑖 열의 원소들은 vertex 𝑖에서 각각의 vertex와 연결 된 edge의 weight
𝐿 =
𝐷 𝑊 𝐿 = 𝐷 − 𝑊
더 나아가기에 앞서, 선형대수의
1. Eigenvector와 Eigenvalue
2. Positive-semidefinite
에 대해서 알아보자.
Go to appendix 1
Go to appendix 2
Recall, clustering!
우리는 data를 2개의 cluster로 나누려고(partitioning) 한다.
Step 1 : Data를 Graph 구조로 변형(transformation)
Step 2 : Graph Partitioning 또는 Graph Clustering 수행
especially, using graph cut!
 Balanced min-cut 문제
○ 𝑐𝑢𝑡 𝐴, 𝐵 의 정의
① 𝑓 = 𝑓1, … , 𝑓𝑛
𝑇
라고 하자. 그리고 각 𝑓𝑖는 다음의 조건을 만족한다고 하자.
– 𝑓𝑖 = 1 if 𝑉𝑖 ∈ 𝐴
– 𝑓𝑖 = −1 if 𝑉𝑖 ∈ 𝐵
𝑐𝑢𝑡 𝐴, 𝐵 ≔ ෍
𝑖∈𝐴,𝑗∈𝐵
𝑤𝑖𝑗 =
1
4
෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗
2
=
1
2
𝑓 𝑇
𝐷 − 𝑊 𝑓 =
𝟏
𝟐
𝒇 𝑻
𝑳𝒇
Go to appendix 3
solution
𝐦𝐢𝐧
𝒇∈𝑹 𝒏
𝒇 𝑻
𝑳𝒇 s.t. 𝒇 𝑻
𝟙 = 𝟎, 𝒇 𝑻
𝒇 = 𝟏
𝐦𝐢𝐧
𝒇∈𝑹 𝒏
𝒇 𝑻 𝑳𝒇
𝒇 𝑻 𝒇
s.t. 𝒇 𝑻
𝟙 = 𝟎
min
𝐴,𝐵
𝑐𝑢𝑡(𝐴, 𝐵) s.t. 𝐴 = |𝐵|
min
𝑓∈{−1,1} 𝑛
𝑓 𝑇 𝐿𝑓 s.t. 𝑓 𝑇 𝟙 = 0
● Balanced min-cut 문제의 솔루션
why? normalization & 영 벡터 방지
Relaxation
따라서, 우리가 구하고자 하는 solution 𝒇는 𝐿의 두 번째로 작은 고유 값에
대응하는 고유 벡터, 즉 두 번째 고유 벡터(second eigenvector)이다.
Go to appendix 4
 Balanced min-cut problem의 solution 𝑓는 (unnormalized) graph laplacian 𝐿의
두 번째 고유 벡터(second eigenvector)였다.
 그러면 두 번째 고유 벡터로 어떻게 cut을 생성할까?
○ vertex 𝑖 ∈ 𝐴, if 𝑓𝑖 ≥ 0
○ vertex 𝑖 ∈ 𝐵, if 𝑓𝑖 < 0
예를 들어, 𝐿의 두 번째 고유 벡터가 (1, -1, 0, -3, 4, 6, -5)
𝑣2 𝑣4
𝑣7
𝑣5
𝑣1
𝑣3
𝑣6
𝑓 : binary 𝑓 : eigenvector
Round
 𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴, 𝐵 문제
○ 𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴, 𝐵 의 정의
① 𝑓 = 𝑓1, … , 𝑓𝑛
𝑇
라고 하자. 그리고 각 𝑓𝑖는 다음의 조건을 만족한다고 하자.
– 𝑓𝑖 =
𝐵
𝐴
if 𝑉𝑖 ∈ 𝐴
– 𝑓𝑖 = −
𝐴
𝐵
if 𝑉𝑖 ∈ 𝐵
𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴, 𝐵 ≔
𝑐𝑢𝑡 𝐴, 𝐵
𝐴
+
𝑐𝑢𝑡 𝐴, 𝐵
|𝐵|
=
1
2 𝑉
෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗
2
=
𝟏
𝒏
𝒇 𝑻 𝑳𝒇
𝐦𝐢𝐧
𝒇∈𝑹 𝒏
𝒇 𝑻 𝑳𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎, 𝒇 𝑻 𝒇 = 𝒏
 𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴1, 𝐴2, … , 𝐴 𝑘 문제
○ Given a partition of 𝑉 into 𝑘 sets, we define 𝑘 indicator vectors ℎ𝑗 = (ℎ1,𝑗, … , ℎ 𝑛,𝑗) by
① ℎ𝑖,𝑗 =
1
|𝐴 𝑗|
if 𝑣𝑖 ∈ 𝐴𝑗
② ℎ𝑖,𝑗 = 0 otherwise
for all (𝑖 = 1, … , 𝑛; 𝑗 = 1, … , 𝑘)
𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴1, … , 𝐴 𝑘 ≔ ෍
𝑖=1
𝑘
ℎ𝑖
𝑇
𝐿ℎ𝑖 = ෍
𝑖=1
𝑘
𝐻 𝑇
𝐿𝐻 𝑖𝑖 = 𝑇𝑟(𝐻 𝑇
𝐿𝐻)
𝐦𝐢𝐧
𝑯∈ℝ 𝒏×𝒌
𝑻𝒓(𝑯 𝑻 𝑳𝑯) s.t. 𝑯 𝑻 𝑯 = 𝑰
 Balanced min-cut problem의 relaxed solution은 unnormalized graph laplacian 𝐿
의 두 번째 고유 벡터(second eigenvector) 이다.
 RatioCut problem의 relaxed solution은 unnormalized graph laplacian 𝐿의 두 번
째 고유 벡터(second eigenvector) 이다.
 NormalizedCut problem의 relaxed solution은 normalized graph laplacian 𝐿′
=
𝐼 − 𝐷−1 𝑊의 두 번째 고유 벡터(second eigenvector) 이다.
 http://www.cs.cmu.edu/~aarti/Class/10701/readings/Luxburg06_TR.pdf
 http://ai.stanford.edu/~ang/papers/nips01-spectral.pdf
 http://www.math.ucsd.edu/~njw/Teaching/Math271C/Lecture_03.pdf
 Duality in Nonlinear Programming: A Simplified Applications-Oriented
Development, A. M. Geoffrion
 http://theory.stanford.edu/~trevisan/cs261/lecture07.pdf
 Linear Transformation
○ 2개의 vector space 𝑉, 𝑊에 대하여,
○ 𝑉와 𝑊사이의 map 𝑇: 𝑉 ⟶ 𝑊
○ such that
① T 𝑉1 + 𝑉2 = 𝑇 𝑉1 + 𝑇(𝑉2)
② T 𝛼𝑉 = 𝛼𝑇(𝑉)
𝑉1𝑉2
𝑇(𝑉1)
𝑇(𝑉2)
𝑉1 + 𝑉2
𝑉 𝑊
𝑇(𝑉1 + 𝑉2)
𝑻
 𝐴 : 𝑛 × 𝑛 matrix , 𝕩 : 𝑛 × 1 vector , 𝑇: ℝ 𝑛 → ℝ 𝑛 linear transformation
𝑻 𝕩 = 𝑨𝕩
○ 𝑇 𝕩1 + 𝕩2 = A 𝕩1 + 𝕩2 = A𝕩1 + 𝐴𝕩2 = 𝑇 𝕩1 + 𝑇(𝕩2)
○ 𝑇 𝛼𝕩 = 𝐴 𝛼𝕩 = 𝛼𝐴 𝕩 = 𝛼𝑇(𝕩)
○ Hence, 𝐴𝕩는 ℝ 𝑛
에서의 선형변환을 나타낸다.
𝕩1
𝐴𝕩1 = 𝕩2
ℝ2
𝐴𝕪1 = 𝕪2 = 2𝕪1
`
𝕪1
𝕫1
𝐴𝕫1 = 𝕫2
○ 𝕪1의 경우를 살펴보자. 𝕪1의 선형변환은 자기자신의 scala 배에 해당하는 벡터가(2𝕪1)
된다.
○ 선형변환 𝐴𝕪1은 스칼라값 2와 벡터 𝕪1으로 설명가능하다.
○ 여기서 2는 𝐴의 고유값(eigenvalue), 벡터 𝕪1은 고유벡터(eigenvector)라고 한다.
ℝ2
𝐴𝕪1 = 𝕪2 = 2𝕪1
`
𝕪1
 Eigenvector?
𝐴𝕩 = 𝜆𝕩
를 만족하는 𝜆를 행렬 𝐴의 고유 값(eigenvalue)이라 하고, 𝕩를 𝜆에 대응하는
𝐴의 고유 벡터(eigenvector)라고 한다.
고유 값을 구하기 위해서는 아래의 특성 방정식을 풀면 된다.
eigenvalues의 집합(multi set)을 spectrum, spectra라고 부른다.
det 𝐴 − 𝜆𝐼 = 0
𝐴 =
𝑎 𝑏
𝑐 𝑑
→ det 𝐴 = 𝑎𝑑 − 𝑏𝑐
 non zero 𝑓 = 𝑓1, … , 𝑓𝑛
𝑇, 𝐿 𝑛×𝑛에 대하여,
𝒇 𝑻
𝑳𝒇 ≥ 𝟎
이면, 𝐿을 positive-semidefinite라고 한다.
 Theorem : The following statement are equivalent.
○ The symmetric matrix 𝐿 is positive semidefinite.
○ All eigenvalues 𝜆1, 𝜆2, … , 𝜆 𝑛 of 𝐿 are nonnegative.
○ 0 is the smallest eigenvalues of 𝐿 which is correspond to eigenvector 𝟙.
① Eigenvalues 𝜆1 = 0, 𝜆2, … , 𝜆 𝑛 are ordered by ascending order.
② Eigenvector 𝕧1 = 𝟙, 𝕧2, … , 𝕧 𝑛 are correspond to above eigenvalues.
○ There exists 𝐵 such that 𝐴 = 𝐵 𝑇
𝐵.
 𝐿은 (Un-normalized) Graph Laplacian 이다.
 𝐿의 각 row의 합은 0이다.
○ 𝐷의 𝑖 열의 𝑑𝑖 는 vertex 𝑖 의 degree
○ 𝑊의 𝑖 열의 원소들은 vertex 𝑖에서 각각의 vertex와 연결 된 edge의 weight
 Spectral property of 𝐿
○ 𝐿의 가장 작은 고유 값(eigenvalue)은 0이고, 0에 대응되는 고유 벡터(eigenvector)는
𝟙 = 1, … . , 1 𝑇
이다.
𝐿𝟙 = 𝐷𝟙 − 𝑊𝟙 =
𝑑1
𝑑2
⋮
𝑑 𝑛
−
Σ𝑗 𝑤1𝑗
Σ𝑗 𝑤2𝑗
⋮
Σ𝑗 𝑤 𝑛𝑗
=
0
0
⋮
0
 Unnormalized Graph Laplacian
𝑳 = 𝑫 − 𝑾
 Normalized Graph Laplacian
𝑳 𝒔𝒚𝒎 = 𝑫−
𝟏
𝟐 𝑳𝑫−
𝟏
𝟐 = 𝑰 − 𝑫−
𝟏
𝟐 𝑾𝑫−
𝟏
𝟐
𝑳 𝒓𝒘 = 𝑫−𝟏
𝑳 = 𝑰 − 𝑫−𝟏
𝑾
Back
 𝑐𝑢𝑡 𝐴, 𝐵 ≔ σ𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗
○ 𝑓 = 𝑓1, … , 𝑓𝑛
𝑇
라고 하자. 그리고 각 𝑓𝑖는 다음의 조건을 만족한다고 하자.
① 𝑓𝑖 = 1 if 𝑋𝑖 ∈ 𝐴
② 𝑓𝑖 = −1 if 𝑋𝑖 ∈ 𝐵
𝒄𝒖𝒕 𝑨, 𝑩 ≔ ෍
𝑖∈𝐴,𝑗∈𝐵
𝑤𝑖𝑗 =
1
4
෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗
2
=
1
2
1
2
෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗
2
=
1
2
1
2
෍
𝑖
෍
𝑗
𝑤𝑖𝑗(𝑓𝑖
2
− 2𝑓𝑖 𝑓𝑗 + 𝑓𝑗
2
)
=
1
2
1
2
(෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖
2
− 2 ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑗
2
)
=
1
2
1
2
(෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖
2
− 2 ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑗
2
)
앞의 식에 이어서,
=
1
2
1
2
(෍
𝑖
(෍
𝑗
𝑤𝑖𝑗)𝑓𝑖
2
− 2 ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍
𝑗
(෍
𝑖
𝑤𝑖𝑗)𝑓𝑗
2
)
𝑑𝑖 = ෍
𝑗
𝑤𝑖𝑗
𝑑𝑗 = ෍
𝑖
𝑤𝑖𝑗
=
1
2
1
2
(෍
𝑖
𝑑𝑖 𝑓𝑖
2
− 2 ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍
𝑗
𝑑𝑗 𝑓𝑗
2
)
=
1
2
1
2
(2 ෍
𝑖
𝑑𝑖 𝑓𝑖
2
− 2 ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗)
=
1
2
෍
𝑖
𝑑𝑖 𝑓𝑖
2
− ෍
𝑖
෍
𝑗
𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗)
=
1
2
𝑓 𝑇
𝐷𝑓 − 𝑓 𝑇
𝑊𝑓 =
1
2
𝑓 𝑇
𝐷 − 𝑊 𝑓 =
𝟏
𝟐
𝒇 𝑻
𝑳𝒇
이 과정은 뒷페이지 참조
𝑓 = 𝑓1, 𝑓2, … , 𝑓𝑛
𝑇 𝐷 =
𝑑1 0 0
0 ⋱ 0
0 0 𝑑 𝑛
𝑊 =
𝑤11 ⋯ 𝑤1𝑛
⋮ ⋱ ⋮
𝑤 𝑛1 ⋯ 𝑤 𝑛𝑛
𝑓 𝑇
𝐷 = (𝑓1 𝑑1, 𝑓2 𝑑2, … , 𝑓𝑛 𝑑 𝑛)
𝑓 𝑇
𝐷𝑓 = ෍
𝑖
𝑓𝑖 𝑑𝑖 𝑓𝑖 = ෍
𝑖
𝑓𝑖
2
𝑑𝑖
𝑓 𝑇 𝑊 = ෍
𝑖
𝑓𝑖 𝑤𝑖1 , ෍
𝑖
𝑓𝑖 𝑤𝑖2, … , ෍
𝑖
𝑓𝑖 𝑤𝑖𝑛
𝑓 𝑇
𝑊𝑓 = ෍
𝑗
𝑓𝑗 ෍
𝑖
𝑓𝑖 𝑤𝑖𝑗 = ෍
𝑖
෍
𝑗
𝑓𝑖 𝑓𝑗 𝑤𝑖𝑗
Back
○ 위 식은, 아직도 NP-hard이다. 따라서 우리는 𝑓를 더 쉽게(relax) 만들 것이다.
즉, 𝑓를 binary가 아닌 실수의 집합으로 확장할 것이다.
𝐦𝐢𝐧
𝒇∈𝑹 𝒏
𝒇 𝑻 𝑳𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎, 𝒇 𝑻 𝒇 = 𝟏
𝐦𝐢𝐧
𝒇∈𝑹 𝒏
𝒇 𝑻 𝑳𝒇
𝒇 𝑻 𝒇
s.t. 𝒇 𝑻 𝟙 = 𝟎
min
𝐴,𝐵
𝑐𝑢𝑡(𝐴, 𝐵) s.t. 𝐴 = |𝐵|
min
𝑓∈{−1,1} 𝑛
𝑓 𝑇 𝐿𝑓 s.t. 𝑓 𝑇 𝟙 = 0
● Balanced min-cut 문제를 풀어 보자.
why? normalization & 영 벡터 방지
 주어진 목적 함수의 해는, graph laplacian 𝐿의 고유 값(eigenvalue) 중에서 가장
작은 값이다. (Rayleigh-Ritz theorem)
 만약, 𝑓가 𝐿의 고유 벡터(eigenvector) 라고 생각하자. 그러면,
즉, L의 가장 작은 고유 값은 0이므로, 0에 대응하는 고유 벡터 𝟙을 최적 해로 생각할
수 있다. 하지만, 주어진 조건에, 𝑓 𝑇
𝟙 = 0, 의하여 𝟙은 해가 될 수 없다.
따라서, 우리가 구하고자 하는 solution 𝒇는 𝐿의 두 번째로 작은 고유 값에 대응하는
고유 벡터, 즉 두 번째 고유 벡터(second eigenvector)이다.
𝐦𝐢𝐧
𝒇∈𝑹 𝒏
𝒇 𝑻 𝑳𝒇
𝒇 𝑻 𝒇
s.t. 𝒇 𝑻 𝟙 = 𝟎
𝑓 𝑇
𝐿𝑓
𝑓 𝑇 𝑓
=
𝑓 𝑇
𝜆𝑓
𝑓 𝑇 𝑓
= λ
back

More Related Content

What's hot

Wasserstein GAN 수학 이해하기 I
Wasserstein GAN 수학 이해하기 IWasserstein GAN 수학 이해하기 I
Wasserstein GAN 수학 이해하기 ISungbin Lim
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Simplilearn
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Edureka!
 
Detailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss FunctionDetailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss Function범준 김
 
Introduction to Graph neural networks @ Vienna Deep Learning meetup
Introduction to Graph neural networks @  Vienna Deep Learning meetupIntroduction to Graph neural networks @  Vienna Deep Learning meetup
Introduction to Graph neural networks @ Vienna Deep Learning meetupLiad Magen
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function홍배 김
 
Understanding cnn
Understanding cnnUnderstanding cnn
Understanding cnnRucha Gole
 
Recurrent neural networks rnn
Recurrent neural networks   rnnRecurrent neural networks   rnn
Recurrent neural networks rnnKuppusamy P
 
Graph Neural Network in practice
Graph Neural Network in practiceGraph Neural Network in practice
Graph Neural Network in practicetuxette
 
Graph Representation Learning
Graph Representation LearningGraph Representation Learning
Graph Representation LearningJure Leskovec
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Simplilearn
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep LearningYan Xu
 
GCNによる取引関係グラフからの企業の特徴量抽出
GCNによる取引関係グラフからの企業の特徴量抽出GCNによる取引関係グラフからの企業の特徴量抽出
GCNによる取引関係グラフからの企業の特徴量抽出Masakazu Mori
 
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...Simplilearn
 

What's hot (20)

Wasserstein GAN 수학 이해하기 I
Wasserstein GAN 수학 이해하기 IWasserstein GAN 수학 이해하기 I
Wasserstein GAN 수학 이해하기 I
 
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
Backpropagation And Gradient Descent In Neural Networks | Neural Network Tuto...
 
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
Recurrent Neural Networks (RNN) | RNN LSTM | Deep Learning Tutorial | Tensorf...
 
Xgboost
XgboostXgboost
Xgboost
 
Introduction of VAE
Introduction of VAEIntroduction of VAE
Introduction of VAE
 
그림 그리는 AI
그림 그리는 AI그림 그리는 AI
그림 그리는 AI
 
Linear algebra
Linear algebraLinear algebra
Linear algebra
 
Detailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss FunctionDetailed Description on Cross Entropy Loss Function
Detailed Description on Cross Entropy Loss Function
 
Introduction to Graph neural networks @ Vienna Deep Learning meetup
Introduction to Graph neural networks @  Vienna Deep Learning meetupIntroduction to Graph neural networks @  Vienna Deep Learning meetup
Introduction to Graph neural networks @ Vienna Deep Learning meetup
 
The world of loss function
The world of loss functionThe world of loss function
The world of loss function
 
Locality sensitive hashing
Locality sensitive hashingLocality sensitive hashing
Locality sensitive hashing
 
Understanding cnn
Understanding cnnUnderstanding cnn
Understanding cnn
 
Recurrent neural networks rnn
Recurrent neural networks   rnnRecurrent neural networks   rnn
Recurrent neural networks rnn
 
Graph Neural Network in practice
Graph Neural Network in practiceGraph Neural Network in practice
Graph Neural Network in practice
 
Graph Representation Learning
Graph Representation LearningGraph Representation Learning
Graph Representation Learning
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
 
Optimization in Deep Learning
Optimization in Deep LearningOptimization in Deep Learning
Optimization in Deep Learning
 
GCNによる取引関係グラフからの企業の特徴量抽出
GCNによる取引関係グラフからの企業の特徴量抽出GCNによる取引関係グラフからの企業の特徴量抽出
GCNによる取引関係グラフからの企業の特徴量抽出
 
Attention Is All You Need
Attention Is All You NeedAttention Is All You Need
Attention Is All You Need
 
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
Artificial Neural Network | Deep Neural Network Explained | Artificial Neural...
 

Viewers also liked

스사모 테크톡 - GraphX
스사모 테크톡 - GraphX스사모 테크톡 - GraphX
스사모 테크톡 - GraphXSangWoo Kim
 
Capstone gs:stem night
Capstone gs:stem nightCapstone gs:stem night
Capstone gs:stem nightMolly Engels
 
3Com 1698-610-011-4.01
3Com 1698-610-011-4.013Com 1698-610-011-4.01
3Com 1698-610-011-4.01savomir
 
La información al servicio de la investigación 2015
La información al servicio de la investigación 2015La información al servicio de la investigación 2015
La información al servicio de la investigación 2015Erla Mariela Morales Morgado
 
Verteego Data Suite : support du lancement
Verteego Data Suite : support du lancementVerteego Data Suite : support du lancement
Verteego Data Suite : support du lancementJeremy Fain
 
Las tics en educación
Las tics en educaciónLas tics en educación
Las tics en educaciónShadia Lopez
 
Journey to an Intelligent Industrial Network - Pino de Candia, CTO Midokura
Journey to an Intelligent Industrial Network - Pino de Candia, CTO MidokuraJourney to an Intelligent Industrial Network - Pino de Candia, CTO Midokura
Journey to an Intelligent Industrial Network - Pino de Candia, CTO MidokuraMidokura
 
Theories on the Job & Your Future - A Message to Undergraduates
Theories on the Job & Your Future - A Message to UndergraduatesTheories on the Job & Your Future - A Message to Undergraduates
Theories on the Job & Your Future - A Message to UndergraduatesBrian Swanick
 
OHSU Chair's Conference March 2017
OHSU Chair's Conference March 2017OHSU Chair's Conference March 2017
OHSU Chair's Conference March 2017Ryan Radecki
 
그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)
그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)
그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)Eunwoo Cho
 
Apresentacao Ladytalks -
Apresentacao Ladytalks - Apresentacao Ladytalks -
Apresentacao Ladytalks - Eluza Pinheiro
 
Mini clase sobre el acoso escolar
Mini clase sobre el acoso escolarMini clase sobre el acoso escolar
Mini clase sobre el acoso escolarNicolle Sanchez
 
Implementación de la Ley de Reforma Magisterial 2017
Implementación de la Ley de Reforma Magisterial 2017Implementación de la Ley de Reforma Magisterial 2017
Implementación de la Ley de Reforma Magisterial 2017Educacion Huánuco Dre
 
Mantenimiento de artefactos tecnológicos
Mantenimiento de artefactos tecnológicos  Mantenimiento de artefactos tecnológicos
Mantenimiento de artefactos tecnológicos Heyler Rodriguez Burbano
 
Papel pilas productos toxicos
Papel pilas productos toxicosPapel pilas productos toxicos
Papel pilas productos toxicosfranfrater
 
About program
About programAbout program
About programsijoo82
 
자료구조 그래프
자료구조 그래프자료구조 그래프
자료구조 그래프송미 이
 
On-ly 2.0 Idea Mockup
On-ly 2.0 Idea Mockup On-ly 2.0 Idea Mockup
On-ly 2.0 Idea Mockup embian
 

Viewers also liked (20)

스사모 테크톡 - GraphX
스사모 테크톡 - GraphX스사모 테크톡 - GraphX
스사모 테크톡 - GraphX
 
Capstone gs:stem night
Capstone gs:stem nightCapstone gs:stem night
Capstone gs:stem night
 
3Com 1698-610-011-4.01
3Com 1698-610-011-4.013Com 1698-610-011-4.01
3Com 1698-610-011-4.01
 
La información al servicio de la investigación 2015
La información al servicio de la investigación 2015La información al servicio de la investigación 2015
La información al servicio de la investigación 2015
 
Assigment
AssigmentAssigment
Assigment
 
Verteego Data Suite : support du lancement
Verteego Data Suite : support du lancementVerteego Data Suite : support du lancement
Verteego Data Suite : support du lancement
 
Las tics en educación
Las tics en educaciónLas tics en educación
Las tics en educación
 
Journey to an Intelligent Industrial Network - Pino de Candia, CTO Midokura
Journey to an Intelligent Industrial Network - Pino de Candia, CTO MidokuraJourney to an Intelligent Industrial Network - Pino de Candia, CTO Midokura
Journey to an Intelligent Industrial Network - Pino de Candia, CTO Midokura
 
Theories on the Job & Your Future - A Message to Undergraduates
Theories on the Job & Your Future - A Message to UndergraduatesTheories on the Job & Your Future - A Message to Undergraduates
Theories on the Job & Your Future - A Message to Undergraduates
 
OHSU Chair's Conference March 2017
OHSU Chair's Conference March 2017OHSU Chair's Conference March 2017
OHSU Chair's Conference March 2017
 
그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)
그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)
그래프(Graph)와 그래프 알고리즘(단어사다리 문제 해결)
 
Apresentacao Ladytalks -
Apresentacao Ladytalks - Apresentacao Ladytalks -
Apresentacao Ladytalks -
 
Mini clase sobre el acoso escolar
Mini clase sobre el acoso escolarMini clase sobre el acoso escolar
Mini clase sobre el acoso escolar
 
Implementación de la Ley de Reforma Magisterial 2017
Implementación de la Ley de Reforma Magisterial 2017Implementación de la Ley de Reforma Magisterial 2017
Implementación de la Ley de Reforma Magisterial 2017
 
07. PCA
07. PCA07. PCA
07. PCA
 
Mantenimiento de artefactos tecnológicos
Mantenimiento de artefactos tecnológicos  Mantenimiento de artefactos tecnológicos
Mantenimiento de artefactos tecnológicos
 
Papel pilas productos toxicos
Papel pilas productos toxicosPapel pilas productos toxicos
Papel pilas productos toxicos
 
About program
About programAbout program
About program
 
자료구조 그래프
자료구조 그래프자료구조 그래프
자료구조 그래프
 
On-ly 2.0 Idea Mockup
On-ly 2.0 Idea Mockup On-ly 2.0 Idea Mockup
On-ly 2.0 Idea Mockup
 

Similar to 06. graph mining

Eigendecomposition and pca
Eigendecomposition and pcaEigendecomposition and pca
Eigendecomposition and pcaJinhwan Suk
 
0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vectorJeonghun Yoon
 
Neural network (perceptron)
Neural network (perceptron)Neural network (perceptron)
Neural network (perceptron)Jeonghun Yoon
 
0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalueJeonghun Yoon
 
04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )Jeonghun Yoon
 
05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)Jeonghun Yoon
 
선형대수 08. 선형 변환 (Linear Transformation)
선형대수 08. 선형 변환 (Linear Transformation)선형대수 08. 선형 변환 (Linear Transformation)
선형대수 08. 선형 변환 (Linear Transformation)AHRA CHO
 
Support Vector Machine Tutorial 한국어
Support Vector Machine Tutorial 한국어Support Vector Machine Tutorial 한국어
Support Vector Machine Tutorial 한국어Jungkyu Lee
 
내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)SANG WON PARK
 
패턴 인식 2 classifiers based on bayes decision theory part 1
패턴 인식 2 classifiers based on bayes decision theory part 1패턴 인식 2 classifiers based on bayes decision theory part 1
패턴 인식 2 classifiers based on bayes decision theory part 1jdo
 
0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformationJeonghun Yoon
 
패턴인식-베이즈결정이론기반 분류기 part1
패턴인식-베이즈결정이론기반 분류기 part1패턴인식-베이즈결정이론기반 분류기 part1
패턴인식-베이즈결정이론기반 분류기 part1jdo
 
0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrixJeonghun Yoon
 
Linear algebra.pptx
Linear algebra.pptxLinear algebra.pptx
Linear algebra.pptxGeonWooYoo1
 
[기초수학] 미분 적분학
[기초수학] 미분 적분학[기초수학] 미분 적분학
[기초수학] 미분 적분학KyeongWon Koo
 
03. linear regression
03. linear regression03. linear regression
03. linear regressionJeonghun Yoon
 
Deep Learning from scratch 5장 : backpropagation
 Deep Learning from scratch 5장 : backpropagation Deep Learning from scratch 5장 : backpropagation
Deep Learning from scratch 5장 : backpropagationJinSooKim80
 
선형대수 12강 Gram-Schmidt Orthogonalization
선형대수 12강 Gram-Schmidt Orthogonalization선형대수 12강 Gram-Schmidt Orthogonalization
선형대수 12강 Gram-Schmidt OrthogonalizationAHRA CHO
 

Similar to 06. graph mining (20)

SVM
SVMSVM
SVM
 
Eigendecomposition and pca
Eigendecomposition and pcaEigendecomposition and pca
Eigendecomposition and pca
 
Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)Variational AutoEncoder(VAE)
Variational AutoEncoder(VAE)
 
0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector0124 1 linear_algebra_basic_vector
0124 1 linear_algebra_basic_vector
 
Neural network (perceptron)
Neural network (perceptron)Neural network (perceptron)
Neural network (perceptron)
 
0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue0131 2 spectral_theorem_eigenvalue
0131 2 spectral_theorem_eigenvalue
 
04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )04. logistic regression ( 로지스틱 회귀 )
04. logistic regression ( 로지스틱 회귀 )
 
05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)05. k means clustering ( k-means 클러스터링)
05. k means clustering ( k-means 클러스터링)
 
선형대수 08. 선형 변환 (Linear Transformation)
선형대수 08. 선형 변환 (Linear Transformation)선형대수 08. 선형 변환 (Linear Transformation)
선형대수 08. 선형 변환 (Linear Transformation)
 
Support Vector Machine Tutorial 한국어
Support Vector Machine Tutorial 한국어Support Vector Machine Tutorial 한국어
Support Vector Machine Tutorial 한국어
 
내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)내가 이해하는 SVM(왜, 어떻게를 중심으로)
내가 이해하는 SVM(왜, 어떻게를 중심으로)
 
패턴 인식 2 classifiers based on bayes decision theory part 1
패턴 인식 2 classifiers based on bayes decision theory part 1패턴 인식 2 classifiers based on bayes decision theory part 1
패턴 인식 2 classifiers based on bayes decision theory part 1
 
0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation0131 1 spectral_theorem_transformation
0131 1 spectral_theorem_transformation
 
패턴인식-베이즈결정이론기반 분류기 part1
패턴인식-베이즈결정이론기반 분류기 part1패턴인식-베이즈결정이론기반 분류기 part1
패턴인식-베이즈결정이론기반 분류기 part1
 
0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix0124 2 linear_algebra_basic_matrix
0124 2 linear_algebra_basic_matrix
 
Linear algebra.pptx
Linear algebra.pptxLinear algebra.pptx
Linear algebra.pptx
 
[기초수학] 미분 적분학
[기초수학] 미분 적분학[기초수학] 미분 적분학
[기초수학] 미분 적분학
 
03. linear regression
03. linear regression03. linear regression
03. linear regression
 
Deep Learning from scratch 5장 : backpropagation
 Deep Learning from scratch 5장 : backpropagation Deep Learning from scratch 5장 : backpropagation
Deep Learning from scratch 5장 : backpropagation
 
선형대수 12강 Gram-Schmidt Orthogonalization
선형대수 12강 Gram-Schmidt Orthogonalization선형대수 12강 Gram-Schmidt Orthogonalization
선형대수 12강 Gram-Schmidt Orthogonalization
 

More from Jeonghun Yoon

0307 2 hypothesis_testing
0307 2 hypothesis_testing0307 2 hypothesis_testing
0307 2 hypothesis_testingJeonghun Yoon
 
0307 1 estimation_theory
0307 1 estimation_theory0307 1 estimation_theory
0307 1 estimation_theoryJeonghun Yoon
 
0228 2 sample_distribution
0228 2 sample_distribution0228 2 sample_distribution
0228 2 sample_distributionJeonghun Yoon
 
0221 basic probability theory
0221 basic probability theory0221 basic probability theory
0221 basic probability theoryJeonghun Yoon
 
Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)Jeonghun Yoon
 
Association rule mining
Association rule miningAssociation rule mining
Association rule miningJeonghun Yoon
 
02. naive bayes classifier revision
02. naive bayes classifier   revision02. naive bayes classifier   revision
02. naive bayes classifier revisionJeonghun Yoon
 

More from Jeonghun Yoon (13)

Topic models
Topic modelsTopic models
Topic models
 
0314 2 correlation
0314 2 correlation0314 2 correlation
0314 2 correlation
 
0314 1 anova
0314 1 anova0314 1 anova
0314 1 anova
 
0307 2 hypothesis_testing
0307 2 hypothesis_testing0307 2 hypothesis_testing
0307 2 hypothesis_testing
 
0307 1 estimation_theory
0307 1 estimation_theory0307 1 estimation_theory
0307 1 estimation_theory
 
0228 2 sample_distribution
0228 2 sample_distribution0228 2 sample_distribution
0228 2 sample_distribution
 
0221 basic probability theory
0221 basic probability theory0221 basic probability theory
0221 basic probability theory
 
0207 1 gradient
0207 1 gradient0207 1 gradient
0207 1 gradient
 
Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)Ensemble Model (Hybrid model)
Ensemble Model (Hybrid model)
 
Decision tree
Decision treeDecision tree
Decision tree
 
Association rule mining
Association rule miningAssociation rule mining
Association rule mining
 
02. naive bayes classifier revision
02. naive bayes classifier   revision02. naive bayes classifier   revision
02. naive bayes classifier revision
 
01. introduction
01. introduction01. introduction
01. introduction
 

Recently uploaded

Grid Layout (Kitworks Team Study 장현정 발표자료)
Grid Layout (Kitworks Team Study 장현정 발표자료)Grid Layout (Kitworks Team Study 장현정 발표자료)
Grid Layout (Kitworks Team Study 장현정 발표자료)Wonjun Hwang
 
클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료
클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료
클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료Softwide Security
 
도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'
도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'
도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'Hyundai Motor Group
 
오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료
오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료
오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료Softwide Security
 
파일 업로드(Kitworks Team Study 유현주 발표자료 240510)
파일 업로드(Kitworks Team Study 유현주 발표자료 240510)파일 업로드(Kitworks Team Study 유현주 발표자료 240510)
파일 업로드(Kitworks Team Study 유현주 발표자료 240510)Wonjun Hwang
 
[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf
[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf
[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdfssuserf8b8bd1
 

Recently uploaded (6)

Grid Layout (Kitworks Team Study 장현정 발표자료)
Grid Layout (Kitworks Team Study 장현정 발표자료)Grid Layout (Kitworks Team Study 장현정 발표자료)
Grid Layout (Kitworks Team Study 장현정 발표자료)
 
클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료
클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료
클라우드 애플리케이션 보안 플랫폼 'Checkmarx One' 소개자료
 
도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'
도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'
도심 하늘에서 시속 200km로 비행할 수 있는 미래 항공 모빌리티 'S-A2'
 
오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료
오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료
오픈소스 위험 관리 및 공급망 보안 솔루션 'Checkmarx SCA' 소개자료
 
파일 업로드(Kitworks Team Study 유현주 발표자료 240510)
파일 업로드(Kitworks Team Study 유현주 발표자료 240510)파일 업로드(Kitworks Team Study 유현주 발표자료 240510)
파일 업로드(Kitworks Team Study 유현주 발표자료 240510)
 
[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf
[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf
[OpenLAB] AWS reInvent를 통해 바라본 글로벌 Cloud 기술동향.pdf
 

06. graph mining

  • 2. K-means clustering을 이용하여, (또는, 유클리디안 공간 위의 데이터의 집합을 나눌 때 사용하는 clustering 알고리즘을 이용하여) 위의 objects을 𝐾개의 집단으로 나누어 보자. 각각의 objects은 유클리디안 공간의 데이터로 mapping 된다.
  • 3. 그리고 각각의 데이터는 20차원의 실수로 된 특성 벡터(feature vector)라고 가정해 보자. K-means 알고리즘을 돌릴 때 마다, 모든 데이터와 centroids의 거리(similarity)가 계산된다. (1, 2, 3, 10, 8, -3, -8, 9, 10, 5, 0, 12, -9, 8, 1, 1000, 3, 987, 38, 10) (-80, 32, 13, 1, 0, 0, -8, 91, 1, 15, 20, 32, 1, -98, 3, 1, 3000, 1876, 3, -11) ............................. ............................. .............................
  • 4. 이처럼, 각각의 데이터가 20차원의 특성 벡터라면, 데이터를 다루거나 저장하기가 간편하지 않다. 즉, objects을 특성벡터를 가진 데이터로 변환하게 되면, 데이터를 다루기가 쉽지 않은 상황이 발생 할 가능성이 있다. Clustering에서 중요한 것은, 데이터간의 similarity이다. 데이터 개개인의 물리량보다 데이터간의 similarity에 집중할 수 있는 방법이 없을까? 1 2 8 7 7 1.6 0.5 4 2 2.5
  • 5. 데이터 자체 보다, 데이터 사이의 관계(similarity)에 더 집중하는 방법은 Graph를 통해서 달성 될 수 있다. 1 2 8 7 7 1.6 0.5 4 2 2.5 1 2 8 7 7 1.6 0.5 4 2 2.5 V1 V2 V3 V4 V3 graph networks 위에서 clustering을 수행하자.
  • 6. 여기서 주의할 것은, graph를 이용한 clustering이, 유클리디안 공간 위의 데이터에 대한 clustering의 대안으로 발견된 것이 아니라는 것이다. graph를 이용한 clustering과 유클리디안 공간 위의 데이터에 대한 clustering은 각각 장단점이 있다. graph를 이용한 clustering이, 후자에 대한 단점을 극복할 수 있는 장점이 있을 수 있으나, 후자를 대체하는 기법이라고 생각해서는 안 된다. grpah를 이용한 clustering은 데이터 개개인 자체의 물리량 보다는 데이터간의 관계(similarity)에 집중 할 수 있다는 장점이 있다. 또한, 수학의 역사에서 오랜 부분 발전해 온 다양한 graph theory의 도움을 받아서, objects을 graph 구조로 변환 시킨다면, 다양한 이슈(clustering, web mining, community detection 등)를 비교적 손쉽게 해결 할 수 있다는 장점이 있다.
  • 7. 문제 : 위의 objects을 graph를 이용하여 clusters로 나누어라!
  • 8. Step 1 : Data를 Graph 구조로 변형(transformation) Step 2 : Graph Partitioning 또는 Graph Clustering 수행
  • 9.  𝑛개의 data 𝑋1, … , 𝑋 𝑛과 data사이의 similarity(유사도) 𝑊 𝑋𝑖, 𝑋𝑗 , 𝑖, 𝑗 ∈ {1, … , 𝑛} 가 주어졌을 때, data를 그룹(clusters)로 나누어라(partition). 단, 같은 그룹 안의 data 사이는 유사함이 높고(similar / higher similarity), 서로 다른 그룹의 data 사이는 유사함이 낮다(dissimilar / lower similarity).  𝑛개의 node(vertex)와 edge weight 𝑊𝑖𝑗 , 𝑖, 𝑗 ∈ {1, … , 𝑛}를 가진 Graph를 그룹 (clusters)로 나누어라(partition). 이 때, 같은 그룹 안에 존재하는 node(vertex) 사 이의 edge weight는 높아야 하며, 다른 그룹의 node(vertex) 사이의 edge weight 는 낮아야 한다.
  • 10.  Graph ○ Graph는 vertex(node)와 edge의 집합이다. 2개의 vertex는 edge로 연결 될 수 있다. ○ 𝑉를 vertex의 집합이라 하고, 𝐸를 edge의 집합이라고 할 때, graph 𝐺 = (𝑉, 𝐸)이다. ○ degree of node ① 특정 node에 연결 된 edge의 수 ex) node 1의 degree : 3, node 6의 degree : 1 vertex edge
  • 11.  Undirected graph ○ Edge의 방향이 존재하지 않는다.  Directed graph ○ Edge이 방향이 존재한다. degree : 2 in degree : 2 out degree : 1
  • 12. Step 1 : Data를 Graph 구조로 변형(transformation)
  • 13. Step 1 : Data를 Graph 구조로 변형(transformation) 𝑑1, 𝑑2는 similarity(유사도)가 높다. similarity가 높으면, graph에서 높은 edge weight를 가지게 된다. 예를 들어 𝑊 𝑣1, 𝑣2 = 5 𝑑2 𝑑1 𝑑3 𝑑2 𝑑3는 similarity(유사도)가 낮다. similarity가 낮으면, graph에서 낮은 edge weight를 가지게 된다. 예를 들어 𝑊 𝑣2, 𝑣3 = 1 𝑣3 𝑣2 data set similarity graph 𝑣1
  • 14.  Similarity Graph 𝐺(𝑉, 𝐸, 𝑊) ○ 𝑉 - vertices or nodes (data points) ○ 𝐸 - edge if similarity > thresholds(경계 값) ○ 𝑊 - edge weights (similarities) data set similarity graph 𝑑2 𝑑3 𝑑1 𝑑5 𝑑6 𝑑4 𝑑8 𝑑9 𝑑7 𝑣2 𝑣3 𝑣1 𝑣5 𝑣6 𝑣4 𝑣8 𝑣9 𝑣7 𝑣1 𝑣2 𝑣3 𝑣4 𝑣5 𝑣6 𝑣7 𝑣8 𝑣9 𝑣1 𝑣2 𝑣3 𝑣4 𝑣5 𝑣6 𝑣7 𝑣8 𝑣9 similarity matrix
  • 15.  Similarity graph construction ○ data point를 graph의 node로 대응시키고, data point 사이의 similarity를 가지고 node 사이의 edge를 생성(construction)할 때, edge가 존재하는지 안 하는지, 더 나아 가 edge의 weight가 얼마인지를 결정하는 방법은 다양하다. ① 𝜖-Nearest Neighbor – 𝑊𝑖𝑗 = 1 if 𝕩𝑖 − 𝕩𝑗 ≤ 𝜖 – 𝑊𝑖𝑗 = 0 if otherwise ② 𝐾-Nearest Neighbor – 𝑊𝑖𝑗 = 1 if 𝕩𝑖 or 𝕩𝑗 is 𝑘 nearest of the other. – 𝑊𝑖𝑗 = 0 if otherwise ③Gaussian kernel similarity function – 𝑊𝑖𝑗 = 𝑒 𝕩 𝑖−𝕩 𝑗 2𝜎2 𝕩𝑖 𝕩𝑗 ex) 3-NN
  • 16. Step 2 : Graph Partitioning 또는 Graph Clustering 수행
  • 17. How to partition a graph into 𝟐 clusters? (먼저, graph를 두 개의 cluster로 나누는 graph cut을 생각해 보자.)
  • 18.  Graph cut ○ graph를 두 개의 vertices의 set 𝐴, 𝐵로 나눈다고 할 때, 각각의 set 𝐴와 set 𝐵를 cut이라 고 한다. ○ graph를 두 개의 vertices의 set 𝐴, 𝐵로 나눈다고 할 때, set 𝐴안에 있는 vertices에서 set 𝐵안에 있는 vertices로 연결된 edge의 weight들의 합을 cut의 size라고 한다. 𝑐𝑢𝑡 𝐴, 𝐵 = ෍ 𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗  Min-cut problem ○ graph를 두 개의 set 𝐴, 𝐵로 나누어라. 단, set 𝐴안에 있는 vertices에서 set 𝐵안에 있는 vertices로 연결된 edge의 weight들의 합이 최소가 되게 하라. min 𝑐𝑢𝑡 𝐴, 𝐵 = ෍ 𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗 빨간색 edges의 weight의 합을 최소로 만들자!
  • 19. ○ Min-cut problem을 풀 때의 문제점 ①때때로 고립 된 vertex를 선택한다. ②따라서, cut에 의하여 나눠 지는 set 𝐴, 𝐵에 대한 제약 조건이 필요하다. 이상적인 cut 그러나, 이상적인 cut 보다 낮은 weight를 가지고 있는 cut을 선택하게 된다.
  • 20.  Min-cut problem ○ graph를 두 개의 set 𝐴, 𝐵로 나누어라. 단, set 𝐴안에 있는 vertices에서 set 𝐵안에 있는 vertices로 연결된 edge의 weight들의 합이 최소가 되게 하라. 그리고 set 𝐴와 set 𝐵의 크기(size)를 매우 비슷하게 하라. min 𝑐𝑢𝑡 𝐴, 𝐵 = ෍ 𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗 & 𝑠𝑖𝑧𝑒 𝑜𝑓 𝐴 𝑎𝑛𝑑 𝐵 𝑎𝑟𝑒 𝑣𝑒𝑟𝑦 𝑠𝑖𝑚𝑖𝑙𝑎𝑟. ○ set 𝐴와 set 𝐵의 크기(size)를 측정하는 서로 다른 두 가지 방법이 있다. ①|𝐴| := set 𝐴 에 속하는 vertices의 개수 ② 𝑣𝑜𝑙(𝐴) := σ𝑖∈𝐴 𝑑𝑖 where 𝑑𝑖 = σ 𝑗=1 𝑛 𝑤𝑖𝑗 (𝑑𝑖가 의미하는 것은 vertex 𝑖에서 뻗어 나간 edges의 weight의 합)
  • 21. 𝒄𝒖𝒕 𝑨, 𝑩 가 작은 값을 갖기를 원한다. + 𝑨의 size와 B의 size가 비슷하기를 원한다. How? 예를 들어, 𝑐𝑢𝑡(𝐴,𝐵) |𝐴| 를 생각해 보자. 𝑐𝑢𝑡(𝐴, 𝐵) |𝐴| 분모가 작아 지고, 동시에 분자도 작아 지기 때문에 전체의 값은 빠르게 감소하지 않는다. 𝑐𝑢𝑡(𝐴, 𝐵) |𝐴| 하지만 이 경우, 분모가 작아지고, 동시에 분자가 커지기 때문에 전체의 값은 빠르게 감소한다. 앞으로 cut의 크기를 정의 그대로의 𝒄𝒖𝒕(𝑨, 𝑩) 대신에 살짝 변형된 𝒄𝒖𝒕(𝑨,𝑩) |𝒔𝒊𝒛𝒆 𝒐𝒇 𝒄𝒖𝒕| 의 합으로 정의하여 구하자.
  • 22. ○ Balanced Min-Cut 𝐦𝐢𝐧 𝑨,𝑩 𝒄𝒖𝒕(𝑨, 𝑩) 𝒔. 𝒕. 𝑨 = 𝑩 ○ Ratio Cut 𝑹𝒂𝒕𝒊𝒐𝑪𝒖𝒕 𝑨, 𝑩 ≔ 𝒄𝒖𝒕 𝑨, 𝑩 𝟏 𝑨 + 𝟏 𝑩 ①Ratio Cut의 크기는 𝑐𝑢𝑡(𝐴,𝐵) |𝐴| + 𝑐𝑢𝑡(𝐴,𝐵) |𝐵| 이다. ②주어진 목적 함수(object function)의 최소값은 𝐴 = |𝐵| 일 때 성립한다. 왜냐하면 1 𝐴 + 1 𝐵 의 최소값은 𝐴 = |𝐵| 일 때 성립하기 때문이다. ○ Normalized Cut 𝑵𝑪𝒖𝒕 𝑨, 𝑩 ≔ 𝒄𝒖𝒕(𝑨, 𝑩) 𝟏 𝒗𝒐𝒍(𝑨) + 𝟏 𝒗𝒐𝒍(𝑩) ①Normalized Cut의 크기는 𝑐𝑢𝑡(𝐴,𝐵) 𝑣𝑜𝑙(𝐴) + 𝑐𝑢𝑡(𝐴,𝐵) 𝑣𝑜𝑙(𝐵) 이다. ②주어진 목적 함수(object function)의 최소값은 𝑣𝑜𝑙(𝐴) = 𝑣𝑜𝑙(𝐵) 일 때 성립한다. 왜냐하면 1 𝑣𝑜𝑙(𝐴) + 1 𝑣𝑜𝑙(𝐵) 의 최소값은 𝑣𝑜𝑙(𝐴) = 𝑣𝑜𝑙(𝐵)일 때 성립하기 때문이다.
  • 23.  Ratio Cut과 Normalized Cut을 계산하는 문제는 NP-Hard 문제이다. 즉 polynomial time안에 계산 할 수 없다.  우리는 이것을 풀기 위해 relaxation(완화)를 사용할 것이다. 다음 페이지에서 살펴 보자.
  • 24.  In mathematical optimization, a relaxation is an approximation of a difficult problem by a nearby problem that is easier to solve. A solution of the relaxed problem provides information about the original problem.  Definition (minimization problem) ○ an minimization problem A, 𝑧 = min{𝑐 𝑥 : 𝑥 ∈ 𝑋 ⊆ ℝ 𝑛 } ○ another minimization problem B, 𝑧 𝑅 = min{𝑐 𝑅 𝑥 : 𝑥 ∈ 𝑋 𝑅 ⊆ ℝ 𝑛 } ○ B is a relaxation of A with two properties ① X ⊆ 𝑋 𝑅 ② 𝑐 𝑅(𝑥) ≤ 𝑐(𝑥) for all 𝑥 ∈ 𝑋  Properties (minimization problem) ○ 𝑥∗ 가 original problem의 optimal solution이면, 𝑥∗ ∈ 𝑋 ⊆ 𝑋 𝑅이고, 𝑧 𝑅 ≤ 𝑐 𝑅 𝑥∗ ≤ 𝑐 𝑥∗ = 𝑧 ○ 1, 2의 가정에, 𝑐 𝑅 𝑥 = 𝑐 𝑥 , ∀𝑥 ∈ 𝑋의 가정이 더해지면, relaxed problem의 optimal solution은 original problem에서 실현 가능한 해(feasible solution)이며, original problem의 optimal solution이다.
  • 25. Graph Cut을 수학적으로 표현해 보자!!  Some graph notation ○ 𝑊 = (𝑤𝑖𝑗) adjacency matrix of the graph ①Graph의 vertex 𝑖, 𝑗 사이의 edge가 존재하면 matrix의 𝑖행 𝑗열에, 그 edge의 weight를 입력한다. 𝑊 =
  • 26. ○ 𝑑𝑖 = σ 𝑗 𝑤𝑖𝑗 ①Vertex 𝑖의 degree를 의미한다. 즉, vertex 𝑖에 연결 된 edges의 weight의 합을 의 미한다. ○ Degree Matrix 𝐷 = 𝑑𝑖𝑎𝑔(𝑑1, … , 𝑑 𝑛) 𝐷 =
  • 27. ○ Laplacian Matrix ① graph를 표현하는 matrix ② 𝐿 = 𝐷 − 𝑊 ③ 𝐿의 각 row의 합은 0이다. – 𝐷의 𝑖 열의 𝑑𝑖 는 vertex 𝑖 의 degree – 𝑊의 𝑖 열의 원소들은 vertex 𝑖에서 각각의 vertex와 연결 된 edge의 weight 𝐿 =
  • 28. 𝐷 𝑊 𝐿 = 𝐷 − 𝑊
  • 29. 더 나아가기에 앞서, 선형대수의 1. Eigenvector와 Eigenvalue 2. Positive-semidefinite 에 대해서 알아보자. Go to appendix 1 Go to appendix 2
  • 30. Recall, clustering! 우리는 data를 2개의 cluster로 나누려고(partitioning) 한다. Step 1 : Data를 Graph 구조로 변형(transformation) Step 2 : Graph Partitioning 또는 Graph Clustering 수행 especially, using graph cut!
  • 31.  Balanced min-cut 문제 ○ 𝑐𝑢𝑡 𝐴, 𝐵 의 정의 ① 𝑓 = 𝑓1, … , 𝑓𝑛 𝑇 라고 하자. 그리고 각 𝑓𝑖는 다음의 조건을 만족한다고 하자. – 𝑓𝑖 = 1 if 𝑉𝑖 ∈ 𝐴 – 𝑓𝑖 = −1 if 𝑉𝑖 ∈ 𝐵 𝑐𝑢𝑡 𝐴, 𝐵 ≔ ෍ 𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗 = 1 4 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗 2 = 1 2 𝑓 𝑇 𝐷 − 𝑊 𝑓 = 𝟏 𝟐 𝒇 𝑻 𝑳𝒇 Go to appendix 3 solution
  • 32. 𝐦𝐢𝐧 𝒇∈𝑹 𝒏 𝒇 𝑻 𝑳𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎, 𝒇 𝑻 𝒇 = 𝟏 𝐦𝐢𝐧 𝒇∈𝑹 𝒏 𝒇 𝑻 𝑳𝒇 𝒇 𝑻 𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎 min 𝐴,𝐵 𝑐𝑢𝑡(𝐴, 𝐵) s.t. 𝐴 = |𝐵| min 𝑓∈{−1,1} 𝑛 𝑓 𝑇 𝐿𝑓 s.t. 𝑓 𝑇 𝟙 = 0 ● Balanced min-cut 문제의 솔루션 why? normalization & 영 벡터 방지 Relaxation 따라서, 우리가 구하고자 하는 solution 𝒇는 𝐿의 두 번째로 작은 고유 값에 대응하는 고유 벡터, 즉 두 번째 고유 벡터(second eigenvector)이다. Go to appendix 4
  • 33.  Balanced min-cut problem의 solution 𝑓는 (unnormalized) graph laplacian 𝐿의 두 번째 고유 벡터(second eigenvector)였다.  그러면 두 번째 고유 벡터로 어떻게 cut을 생성할까? ○ vertex 𝑖 ∈ 𝐴, if 𝑓𝑖 ≥ 0 ○ vertex 𝑖 ∈ 𝐵, if 𝑓𝑖 < 0 예를 들어, 𝐿의 두 번째 고유 벡터가 (1, -1, 0, -3, 4, 6, -5) 𝑣2 𝑣4 𝑣7 𝑣5 𝑣1 𝑣3 𝑣6 𝑓 : binary 𝑓 : eigenvector Round
  • 34.  𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴, 𝐵 문제 ○ 𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴, 𝐵 의 정의 ① 𝑓 = 𝑓1, … , 𝑓𝑛 𝑇 라고 하자. 그리고 각 𝑓𝑖는 다음의 조건을 만족한다고 하자. – 𝑓𝑖 = 𝐵 𝐴 if 𝑉𝑖 ∈ 𝐴 – 𝑓𝑖 = − 𝐴 𝐵 if 𝑉𝑖 ∈ 𝐵 𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴, 𝐵 ≔ 𝑐𝑢𝑡 𝐴, 𝐵 𝐴 + 𝑐𝑢𝑡 𝐴, 𝐵 |𝐵| = 1 2 𝑉 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗 2 = 𝟏 𝒏 𝒇 𝑻 𝑳𝒇 𝐦𝐢𝐧 𝒇∈𝑹 𝒏 𝒇 𝑻 𝑳𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎, 𝒇 𝑻 𝒇 = 𝒏
  • 35.  𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴1, 𝐴2, … , 𝐴 𝑘 문제 ○ Given a partition of 𝑉 into 𝑘 sets, we define 𝑘 indicator vectors ℎ𝑗 = (ℎ1,𝑗, … , ℎ 𝑛,𝑗) by ① ℎ𝑖,𝑗 = 1 |𝐴 𝑗| if 𝑣𝑖 ∈ 𝐴𝑗 ② ℎ𝑖,𝑗 = 0 otherwise for all (𝑖 = 1, … , 𝑛; 𝑗 = 1, … , 𝑘) 𝑅𝑎𝑡𝑖𝑜𝐶𝑢𝑡 𝐴1, … , 𝐴 𝑘 ≔ ෍ 𝑖=1 𝑘 ℎ𝑖 𝑇 𝐿ℎ𝑖 = ෍ 𝑖=1 𝑘 𝐻 𝑇 𝐿𝐻 𝑖𝑖 = 𝑇𝑟(𝐻 𝑇 𝐿𝐻) 𝐦𝐢𝐧 𝑯∈ℝ 𝒏×𝒌 𝑻𝒓(𝑯 𝑻 𝑳𝑯) s.t. 𝑯 𝑻 𝑯 = 𝑰
  • 36.  Balanced min-cut problem의 relaxed solution은 unnormalized graph laplacian 𝐿 의 두 번째 고유 벡터(second eigenvector) 이다.  RatioCut problem의 relaxed solution은 unnormalized graph laplacian 𝐿의 두 번 째 고유 벡터(second eigenvector) 이다.  NormalizedCut problem의 relaxed solution은 normalized graph laplacian 𝐿′ = 𝐼 − 𝐷−1 𝑊의 두 번째 고유 벡터(second eigenvector) 이다.
  • 37.  http://www.cs.cmu.edu/~aarti/Class/10701/readings/Luxburg06_TR.pdf  http://ai.stanford.edu/~ang/papers/nips01-spectral.pdf  http://www.math.ucsd.edu/~njw/Teaching/Math271C/Lecture_03.pdf  Duality in Nonlinear Programming: A Simplified Applications-Oriented Development, A. M. Geoffrion  http://theory.stanford.edu/~trevisan/cs261/lecture07.pdf
  • 38.  Linear Transformation ○ 2개의 vector space 𝑉, 𝑊에 대하여, ○ 𝑉와 𝑊사이의 map 𝑇: 𝑉 ⟶ 𝑊 ○ such that ① T 𝑉1 + 𝑉2 = 𝑇 𝑉1 + 𝑇(𝑉2) ② T 𝛼𝑉 = 𝛼𝑇(𝑉) 𝑉1𝑉2 𝑇(𝑉1) 𝑇(𝑉2) 𝑉1 + 𝑉2 𝑉 𝑊 𝑇(𝑉1 + 𝑉2) 𝑻
  • 39.  𝐴 : 𝑛 × 𝑛 matrix , 𝕩 : 𝑛 × 1 vector , 𝑇: ℝ 𝑛 → ℝ 𝑛 linear transformation 𝑻 𝕩 = 𝑨𝕩 ○ 𝑇 𝕩1 + 𝕩2 = A 𝕩1 + 𝕩2 = A𝕩1 + 𝐴𝕩2 = 𝑇 𝕩1 + 𝑇(𝕩2) ○ 𝑇 𝛼𝕩 = 𝐴 𝛼𝕩 = 𝛼𝐴 𝕩 = 𝛼𝑇(𝕩) ○ Hence, 𝐴𝕩는 ℝ 𝑛 에서의 선형변환을 나타낸다. 𝕩1 𝐴𝕩1 = 𝕩2 ℝ2 𝐴𝕪1 = 𝕪2 = 2𝕪1 ` 𝕪1 𝕫1 𝐴𝕫1 = 𝕫2
  • 40. ○ 𝕪1의 경우를 살펴보자. 𝕪1의 선형변환은 자기자신의 scala 배에 해당하는 벡터가(2𝕪1) 된다. ○ 선형변환 𝐴𝕪1은 스칼라값 2와 벡터 𝕪1으로 설명가능하다. ○ 여기서 2는 𝐴의 고유값(eigenvalue), 벡터 𝕪1은 고유벡터(eigenvector)라고 한다. ℝ2 𝐴𝕪1 = 𝕪2 = 2𝕪1 ` 𝕪1
  • 41.  Eigenvector? 𝐴𝕩 = 𝜆𝕩 를 만족하는 𝜆를 행렬 𝐴의 고유 값(eigenvalue)이라 하고, 𝕩를 𝜆에 대응하는 𝐴의 고유 벡터(eigenvector)라고 한다. 고유 값을 구하기 위해서는 아래의 특성 방정식을 풀면 된다. eigenvalues의 집합(multi set)을 spectrum, spectra라고 부른다. det 𝐴 − 𝜆𝐼 = 0 𝐴 = 𝑎 𝑏 𝑐 𝑑 → det 𝐴 = 𝑎𝑑 − 𝑏𝑐
  • 42.  non zero 𝑓 = 𝑓1, … , 𝑓𝑛 𝑇, 𝐿 𝑛×𝑛에 대하여, 𝒇 𝑻 𝑳𝒇 ≥ 𝟎 이면, 𝐿을 positive-semidefinite라고 한다.  Theorem : The following statement are equivalent. ○ The symmetric matrix 𝐿 is positive semidefinite. ○ All eigenvalues 𝜆1, 𝜆2, … , 𝜆 𝑛 of 𝐿 are nonnegative. ○ 0 is the smallest eigenvalues of 𝐿 which is correspond to eigenvector 𝟙. ① Eigenvalues 𝜆1 = 0, 𝜆2, … , 𝜆 𝑛 are ordered by ascending order. ② Eigenvector 𝕧1 = 𝟙, 𝕧2, … , 𝕧 𝑛 are correspond to above eigenvalues. ○ There exists 𝐵 such that 𝐴 = 𝐵 𝑇 𝐵.
  • 43.  𝐿은 (Un-normalized) Graph Laplacian 이다.  𝐿의 각 row의 합은 0이다. ○ 𝐷의 𝑖 열의 𝑑𝑖 는 vertex 𝑖 의 degree ○ 𝑊의 𝑖 열의 원소들은 vertex 𝑖에서 각각의 vertex와 연결 된 edge의 weight  Spectral property of 𝐿 ○ 𝐿의 가장 작은 고유 값(eigenvalue)은 0이고, 0에 대응되는 고유 벡터(eigenvector)는 𝟙 = 1, … . , 1 𝑇 이다. 𝐿𝟙 = 𝐷𝟙 − 𝑊𝟙 = 𝑑1 𝑑2 ⋮ 𝑑 𝑛 − Σ𝑗 𝑤1𝑗 Σ𝑗 𝑤2𝑗 ⋮ Σ𝑗 𝑤 𝑛𝑗 = 0 0 ⋮ 0
  • 44.  Unnormalized Graph Laplacian 𝑳 = 𝑫 − 𝑾  Normalized Graph Laplacian 𝑳 𝒔𝒚𝒎 = 𝑫− 𝟏 𝟐 𝑳𝑫− 𝟏 𝟐 = 𝑰 − 𝑫− 𝟏 𝟐 𝑾𝑫− 𝟏 𝟐 𝑳 𝒓𝒘 = 𝑫−𝟏 𝑳 = 𝑰 − 𝑫−𝟏 𝑾 Back
  • 45.  𝑐𝑢𝑡 𝐴, 𝐵 ≔ σ𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗 ○ 𝑓 = 𝑓1, … , 𝑓𝑛 𝑇 라고 하자. 그리고 각 𝑓𝑖는 다음의 조건을 만족한다고 하자. ① 𝑓𝑖 = 1 if 𝑋𝑖 ∈ 𝐴 ② 𝑓𝑖 = −1 if 𝑋𝑖 ∈ 𝐵 𝒄𝒖𝒕 𝑨, 𝑩 ≔ ෍ 𝑖∈𝐴,𝑗∈𝐵 𝑤𝑖𝑗 = 1 4 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗 2 = 1 2 1 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 − 𝑓𝑗 2 = 1 2 1 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗(𝑓𝑖 2 − 2𝑓𝑖 𝑓𝑗 + 𝑓𝑗 2 ) = 1 2 1 2 (෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 2 − 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑗 2 )
  • 46. = 1 2 1 2 (෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 2 − 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑗 2 ) 앞의 식에 이어서, = 1 2 1 2 (෍ 𝑖 (෍ 𝑗 𝑤𝑖𝑗)𝑓𝑖 2 − 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍ 𝑗 (෍ 𝑖 𝑤𝑖𝑗)𝑓𝑗 2 ) 𝑑𝑖 = ෍ 𝑗 𝑤𝑖𝑗 𝑑𝑗 = ෍ 𝑖 𝑤𝑖𝑗 = 1 2 1 2 (෍ 𝑖 𝑑𝑖 𝑓𝑖 2 − 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗 + ෍ 𝑗 𝑑𝑗 𝑓𝑗 2 ) = 1 2 1 2 (2 ෍ 𝑖 𝑑𝑖 𝑓𝑖 2 − 2 ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗) = 1 2 ෍ 𝑖 𝑑𝑖 𝑓𝑖 2 − ෍ 𝑖 ෍ 𝑗 𝑤𝑖𝑗 𝑓𝑖 𝑓𝑗) = 1 2 𝑓 𝑇 𝐷𝑓 − 𝑓 𝑇 𝑊𝑓 = 1 2 𝑓 𝑇 𝐷 − 𝑊 𝑓 = 𝟏 𝟐 𝒇 𝑻 𝑳𝒇 이 과정은 뒷페이지 참조
  • 47. 𝑓 = 𝑓1, 𝑓2, … , 𝑓𝑛 𝑇 𝐷 = 𝑑1 0 0 0 ⋱ 0 0 0 𝑑 𝑛 𝑊 = 𝑤11 ⋯ 𝑤1𝑛 ⋮ ⋱ ⋮ 𝑤 𝑛1 ⋯ 𝑤 𝑛𝑛 𝑓 𝑇 𝐷 = (𝑓1 𝑑1, 𝑓2 𝑑2, … , 𝑓𝑛 𝑑 𝑛) 𝑓 𝑇 𝐷𝑓 = ෍ 𝑖 𝑓𝑖 𝑑𝑖 𝑓𝑖 = ෍ 𝑖 𝑓𝑖 2 𝑑𝑖 𝑓 𝑇 𝑊 = ෍ 𝑖 𝑓𝑖 𝑤𝑖1 , ෍ 𝑖 𝑓𝑖 𝑤𝑖2, … , ෍ 𝑖 𝑓𝑖 𝑤𝑖𝑛 𝑓 𝑇 𝑊𝑓 = ෍ 𝑗 𝑓𝑗 ෍ 𝑖 𝑓𝑖 𝑤𝑖𝑗 = ෍ 𝑖 ෍ 𝑗 𝑓𝑖 𝑓𝑗 𝑤𝑖𝑗 Back
  • 48. ○ 위 식은, 아직도 NP-hard이다. 따라서 우리는 𝑓를 더 쉽게(relax) 만들 것이다. 즉, 𝑓를 binary가 아닌 실수의 집합으로 확장할 것이다. 𝐦𝐢𝐧 𝒇∈𝑹 𝒏 𝒇 𝑻 𝑳𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎, 𝒇 𝑻 𝒇 = 𝟏 𝐦𝐢𝐧 𝒇∈𝑹 𝒏 𝒇 𝑻 𝑳𝒇 𝒇 𝑻 𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎 min 𝐴,𝐵 𝑐𝑢𝑡(𝐴, 𝐵) s.t. 𝐴 = |𝐵| min 𝑓∈{−1,1} 𝑛 𝑓 𝑇 𝐿𝑓 s.t. 𝑓 𝑇 𝟙 = 0 ● Balanced min-cut 문제를 풀어 보자. why? normalization & 영 벡터 방지
  • 49.  주어진 목적 함수의 해는, graph laplacian 𝐿의 고유 값(eigenvalue) 중에서 가장 작은 값이다. (Rayleigh-Ritz theorem)  만약, 𝑓가 𝐿의 고유 벡터(eigenvector) 라고 생각하자. 그러면, 즉, L의 가장 작은 고유 값은 0이므로, 0에 대응하는 고유 벡터 𝟙을 최적 해로 생각할 수 있다. 하지만, 주어진 조건에, 𝑓 𝑇 𝟙 = 0, 의하여 𝟙은 해가 될 수 없다. 따라서, 우리가 구하고자 하는 solution 𝒇는 𝐿의 두 번째로 작은 고유 값에 대응하는 고유 벡터, 즉 두 번째 고유 벡터(second eigenvector)이다. 𝐦𝐢𝐧 𝒇∈𝑹 𝒏 𝒇 𝑻 𝑳𝒇 𝒇 𝑻 𝒇 s.t. 𝒇 𝑻 𝟙 = 𝟎 𝑓 𝑇 𝐿𝑓 𝑓 𝑇 𝑓 = 𝑓 𝑇 𝜆𝑓 𝑓 𝑇 𝑓 = λ back