networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
current_flow_closeness_centrality(G, weight=None, dtype=<class 'float'>, solver='lu')

Current-flow closeness centrality is variant of closeness centrality based on effective resistance between nodes in a network. This metric is also known as information centrality.

Notes

The algorithm is from Brandes .

See also for the original definition of information centrality.

Parameters

G : graph

A NetworkX graph.

weight : None or string, optional (default=None)

If None, all edge weights are considered equal. Otherwise holds the name of the edge attribute used as weight. The weight reflects the capacity or the strength of the edge.

dtype: data type (default=float) :

Default data type for internal matrices. Set to np.float32 for lower memory consumption.

solver: string (default='lu') :

Type of linear solver to use for computing the flow matrix. Options are "full" (uses most memory), "lu" (recommended), and "cg" (uses least memory).

Returns

nodes : dictionary

Dictionary of nodes with current flow closeness centrality as the value.

Compute current-flow closeness centrality for nodes.

See Also

closeness_centrality

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/centrality/current_flow_closeness.py#14
type: <class 'function'>
Commit: