current_flow_closeness_centrality#

current_flow_closeness_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, 基于电流流的中心性度量。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: 重新思考中心性:方法和示例。Social Networks 11(1):1-37, 1989. https://doi.org/10.1016/0378-8733(89)90016-6