网络特征刻画(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
____
____