2. 1
Agenda I. Big Data Warehouse
II. SNA & R
III. 실시간 MapReduce
3. 2
I. SNA & R : Overview
Social Network Analysis
• Social Influencer (Centrality)
• Degree centrality
• Eigenvlue centrality
R을 이용한 Network Analysis
• Social Network 군집화
• Network Graph의 시각화 (Gephi)
4. 3
Social Influencer
SNA (Social Network Analysis)
사람이나 사물, 조직, 기술, 자원 등의 연결관계 속에서 핵심적인 기능을 담당하는
행위주체를 판별/발굴하고 보다 효과적인 인력/자원 활용 및 조직화 방안을 제시하
는 분석기법
network theory의 관점에서 social relationship을 이해/분석할 수 있는 다양한 분야
에서 활용 가능
활용 예
Visualization (social network diagram)
Centrality
Community
Recommendation
5. 4
Social Influencer
Centrality
소셜 네트워크에서의 influence(importance)를 구하는 방법
Social Graph
Centrality 종류
Degree centrality
Betweenness centrality
Closeness centrality
Eigenvector centrality
Vertex Edge
Facebook 사람 Relationship (친구, 결혼, 연애, 동창, colocation 등)
Foursquare 장소 Signal (이동경로, co-visitation, menu, 사람 등)
6. 5
Social Influencer
Centrality
소셜 네트워크에서의 influence(importance)를 구하는 방법
Social Graph
Centrality 종류
Degree centrality
Betweenness centrality
Closeness centrality
Eigenvector centrality
Vertex Edge
Facebook 사람 Relationship (친구, 결혼, 연애, 동창, colocation 등)
Foursquare 장소 Signal (이동경로, co-visitation, menu, 사람 등)
11. 10
Degree Centrality
MapReduce (Key, Value) 설계
A B
A C
D E
D E
입력 파일
1, A B
2, A C
3, D E
4, D E
Input (k1: 열 번호, v1 : 입력 라인)
Output (k2 : 발신자, v2 : 수신자)
A, B
A, C
D, E
D, E
A, [B, C]
D, [E, E]
맵 함수 임시 결과
정렬/병합
Input (k2 : 발신자, v2 : 수신자)
Output (v3 : 통화목록)
A, [(B,1), (C,1)
]
D, [(E,2)]
map : (k1, v1) -> list(k2, v2)
reduce : (k2, list(v2)) -> list(v3)
출력 파일
Mapper
Reducer
15. 14
Degree Centrality
실제 데이터를 사용한 Degree Centrality 분석 결과
발신자 influencer : 약 700만 건의 VOC / SMS
수신자 influencer : 특수 번호(119 등), 각종 서비스 번호
발신자 인플루언서 수신자 인플루언서
[hadoop@skcc-nebdap02 hadoop]$ bin/hadoop dfs -text
cdr/output/topHubUsers/part-r-00000 | head -20
(1192838846,6945398) 6945398
(1020770705,4986855) 4986855
(1089673003,2390573) 2390573
(1040079536,1546922) 1546922
(1031076610,1159645) 1159645
(1054435805,627850) 627850
(112074334,579046) 579046
(1190170113,551839) 551839
(1092091847,541011) 541011
(1020972802,529863) 529863
(1047268736,430949) 430949
(1047890008,28289) 28289
(1031296426,20675) 20675
(1092641133,1151) 1151
(1093132716,1110) 1110
(117418885,924) 924
(114099979,924) 924
[hadoop@skcc-nebdap02 hadoop]$ bin/hadoop dfs -text
cdr/output/topAuthorityUsers/part-r-00000 | head -20
(15882100,117746) 117746
(10114,112694) 112694
(101508,106191) 106191
(89,78993) 78993
(1056165827,50225) 50225
(15889999,42442) 42442
(111508,30376) 30376
(15885000,22696) 22696
(114,19252) 19252
(15442100,19142) 19142
(16009316,17604) 17604
(15778000,17093) 17093
(131,16985) 16985
(119,16644) 16644
(112,16444) 16444
(101515,15763) 15763
(100,15100) 15100
16. 15
Eigenvalue Centrality
Adjacency Matrix
Network diagram
single person with high degree
single person low degree
but high connectivity (ex CEO)
21. 20
Eigenvalue Centrality
Power Iteration
matrix-vector 곱셈
vector-vector 뺄셈
matrix 전치
vector 내적
Matrix-Vector Multiplication
dense matrix sparse matrix
from numpy import *
def norm2(v):
return sqrt(v.T*v).item()
def PowerMethod(A, y, e):
while True:
v = y/norm2(y)
y = A*v
t = dot(v.T,y).item()
if norm2(y - t*v) <= e*abs(t):
return (t, v)
22. 21
기타 분석 응용
Summary
이용 시간이 많은 사람 검출
단순 통계 데이터 구축
개인 통화량 변화, 지역/시간 별 통계, 통화 실패 건수 수집 등
Fraud detection
과도한 해외 전화, unexpected destination, 짧고 반복적인 통화 등
Centrality
스팸 발송자 검출 (degree)
특수 번호나 서비스 번호 명시적으로 제거할 필요 없음 (eigen)
Clustering
위치 정보 연동하여 지역 군집과 통화 군집 비교
군집 타겟 마케팅
Classification
이탈 고객 방지
실시간 분석
서비스 품질 모니터링
이동 기지국 활용도 증가
23. 22
I. SNA & R : Overview
Social Network Analysis
• Social Influencer (Centrality)
• Degree centrality
• Eigenvlue centrality
R을 이용한 Network Analysis
• Social Network 군집화
• Network Graph의 시각화 (Gephi)
28. 27
Network Graph의 시각화
Gephi
interactive visualization and exploration platform for all kinds of networks and
complex systems, dynamic and hierarchical graphs.
설정
거리 : 거리가 가까운 node가 가까운 곳에 위치하도록 설정
크기 : node의 크기는 in-degree에 비례하도록 설정
색깔 : cluster에 따라 색깔 지정