信息中心性#

information_centrality(G, weight=None, dtype=<class 'float'>, solver='lu')#

计算节点的电流流紧密度中心性。

电流流紧密度中心性是基于网络中节点间有效电阻的紧密度中心性的一种变体。此度量也称为信息中心性。

参数:
G

一个 NetworkX 图。

weightNone 或字符串,可选 (默认=None)

如果为 None,则所有边权重相等。否则,表示用作权重的边属性名称。权重反映边的容量或强度。

dtype: 数据类型 (默认=float)

内部矩阵的默认数据类型。设置为 np.float32 可降低内存消耗。

solver: 字符串 (默认=’lu’)

用于计算流矩阵的线性求解器类型。选项包括 "full" (使用最多内存),"lu" (推荐),和 "cg" (使用最少内存)。

返回:
nodes字典

一个字典,键为节点,值为其电流流紧密度中心性。

另请参阅

closeness_centrality

说明

该算法来自 Brandes [1]

另请参阅 [2] 获取信息中心性的原始定义。

参考文献

[1]

Ulrik Brandes and Daniel Fleischer, Centrality Measures Based on Current Flow. Proc. 22nd Symp. Theoretical Aspects of Computer Science (STACS ‘05). LNCS 3404, pp. 533-544. Springer-Verlag, 2005. https://doi.org/10.1007/978-3-540-31856-9_44

[2]

Karen Stephenson and Marvin Zelen: Rethinking centrality: Methods and examples. Social Networks 11(1):1-37, 1989. https://doi.org/10.1016/0378-8733(89)90016-6