robins_alexander_clustering#
- robins_alexander_clustering(G)[source]#
计算图 G 的二分聚类。
Robins 和 Alexander [1] 将二分聚类系数定义为二分图中四循环
C_4
数量的四倍除以三路径L_3
的数量\[CC_4 = \frac{4 * C_4}{L_3}\]- 参数:
- G图
一个二分图
- 返回:
- clustering浮点数
输入图的 Robins 和 Alexander 二分聚类系数。
参考文献
[1]Robins, G. and M. Alexander (2004). Small worlds among interlocking directors: Network structure and distance in bipartite graphs. Computational & Mathematical Organization Theory 10(1), 69–94.
示例
>>> from networkx.algorithms import bipartite >>> G = nx.davis_southern_women_graph() >>> print(round(bipartite.robins_alexander_clustering(G), 3)) 0.468