開始使用免費開始

網路特性描繪(III)

上一題是關於度中心性;這次來複習中介中心性!

小提醒:如果執行正確,這題大約需要 5 秒執行時間。

本練習屬於課程

Python 網路分析入門

檢視課程

練習說明

  • 繪製 GitHub 協作網路的中介中心性分佈。請完全依照上一題的相同步驟,只是把 nx.degree_centrality() 換成 nx.betweenness_centrality()

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

# Import necessary modules
import matplotlib.pyplot as plt
import networkx as nx

# Plot the degree distribution of the GitHub collaboration network
____
____
編輯並執行程式碼