katz_centrality#
- katz_centrality(domain, network_name='default_network', edge_weight_name=None, katz_alpha=0.1, katz_beta=1, katz_normalised=True, katz_nstart=None, add_as_label_to_objects=True, new_label_name='Katz centrality', label_cmap='plasma')#
Computes the Katz centrality of each node using the networkx implementation. 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 to compute Katz centrality on, by default ‘default_network’.
- edge_weight_namestr, optional
The name of the edge weight attribute, by default None.
- katz_alphafloat, optional
Attenuation factor, by default 0.1.
- katz_betafloat, optional
Weight attributed to the immediate neighborhood, by default 1.
- katz_normalisedbool, optional
Whether to normalize the centrality values, by default True.
- katz_nstartdict, optional
Starting value of the Katz centrality iteration for each node, by default None.
- add_as_label_to_objectsbool, optional
Whether to add the centrality values as labels to the objects, by default True.
- new_label_namestr, optional
The name of the new label to be added, by default ‘Katz centrality’.
- label_cmapstr, optional
The colormap to be used for the labels, by default ‘plasma’.
- Returns:
- dict
A dictionary of nodes with Katz centrality as the value.
- 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.