中介中心性

Python 網路分析入門

Eric Ma

Data Carpentry instructor and author of nxviz package

所有最短路徑

  • 路徑集合
  • 每條為一對節點間的最短路徑
  • 對所有節點配對計算
Python 網路分析入門

中介中心性

  • 定義:

$$\frac{\text{經過該節點的最短路徑數}}{\text{所有可能的最短路徑數}}$$

  • 應用:
    • 連結自由派與保守派傾向的 Twitter 使用者之橋接點
    • 關鍵資訊傳遞連結
Python 網路分析入門

範例

  • 新加坡:Raffles Place 與 Jurong East

新加坡地鐵路網地圖

1 Source: https://www.seacitymaps.com/singapore/singapore_mrt_map.jpg
Python 網路分析入門

範例

  • 中介中心性高、度中心性低?

啞鈴圖:兩群節點各自有大量互連,兩群之間只靠單一路徑相連。

Python 網路分析入門

中介中心性

import networkx as nx
G = nx.barbell_graph(m1=5, m2=1)

nx.betweenness_centrality(G)
{0: 0.0,
 1: 0.0,
 2: 0.0,
 3: 0.0,
 4: 0.5333333333333333,
 5: 0.5555555555555556,
 6: 0.5333333333333333,
 7: 0.0,
 8: 0.0,
 9: 0.0,
 10: 0.0}

同一個啞鈴圖

Python 網路分析入門

中介中心性

import networkx as nx
G = nx.barbell_graph(m1=5, m2=1)

nx.betweenness_centrality(G)
{0: 0.0,
 1: 0.0,
 2: 0.0,
 3: 0.0,
 4: 0.5333333333333333,
 5: 0.5555555555555556,
 6: 0.5333333333333333,
 7: 0.0,
 8: 0.0,
 9: 0.0,
 10: 0.0}

同一個啞鈴圖,但高亮顯示兩群節點之間路徑上的節點。

Python 網路分析入門

一起來練習吧!

Python 網路分析入門

Preparing Video For Download...