확대와 축소: 그래프 전체 요약

Python 중급 네트워크 분석

Eric Ma

Data Carpentry instructor and author of nxviz package

스케일별 그래프 탐색

  • 전역 및 로컬 수준 탐색

  • 전역: 중심성 분포

  • 로컬: 연결성과 구조

Python 중급 네트워크 분석

노드 확대 보기

  • 특정 노드(들)만 분리

  • 시간에 따른 노드 통계 시각화

Python 중급 네트워크 분석

변화하는 노드 통계 요약

  • 고객-상품 데이터셋
    • 구매 패턴의 시간 변화 분석
  • customer1 — 관심 노드
Python 중급 네트워크 분석

변화하는 노드 통계 요약

Gs = [....] 

noi = 'customer1'
degs = []
for g in Gs: ... # Get the degree of the node degs.append(len(g.neighbors(noi)))
plt.plot(degs) plt.show()
Python 중급 네트워크 분석

변화하는 노드 통계 요약

ch3-3.020.png

Python 중급 네트워크 분석

기본 딕셔너리

from collections import defaultdict
d = defaultdict(list)

d['heathrow'].append(0.31) d['heathrow'].append(0.84)
d
defaultdict(list, {'heathrow': [0.31, 0.84]})
Python 중급 네트워크 분석

기본 딕셔너리

d2 = dict()
d2['heathrow'].append(0.31)
KeyError                           Traceback (most recent call last)
<ipython-input-19-291c74368a8f> in <module>()
--> 1 d2['heathrow'].append(0.31)
KeyError: 'heathrow'
Python 중급 네트워크 분석

연습해 봅시다!

Python 중급 네트워크 분석

Preparing Video For Download...