laplacian_centrality#

laplacian_centrality(domain, network_name='default_network', edge_weight_name=None, add_as_label_to_objects=True, new_label_name='laplacian centrality', label_cmap='plasma')#

Computes the laplacian centrality of each node. The Laplacian centrality of a node is the sum of the inverse of the Laplacian matrix of the network. This is a measure node connectivity in the network. Centrality values will be added as object labels if add_as_label_to_objects is True.

Parameters:
domainobject

The domain containing the network.

network_namestr, optional

The name of the network, by default ‘default_network’.

edge_weight_namestr or None, optional

The name of the edge weight attribute, by default None.

add_as_label_to_objectsbool, optional

Whether to add centrality values as labels to objects, by default True.

new_label_namestr, optional

The name for the new label, by default ‘laplacian centrality’.

label_cmapstr, optional

The colormap to use for the labels, by default ‘plasma’.

Raises
——
ValueError

If the network name is not in the list of generated networks.

ValueError

If the edge weight name is not in the list of edge weights for the network.

Returns
——-
dict

A dictionary of nodes with their corresponding laplacian centrality values.