structify_net.scoring.hierarchy

structify_net.scoring.hierarchy(graph, normalized=False, positive_only=True)

Hierarchy of the graph

The hierarchy is computed as the Spearman correlation coefficient between the degrees and the clustering coefficients of the nodes. If normalized=True, it is normalized to be between 0 and 1. If positive_only=True, it is set to 0 if negative.

Args:

graph (_type_): A graph normalized (bool, optional): If True, the hierarchy is normalized to be between 0 and 1. Defaults to False. positive_only (bool, optional): IF True, the hierarchy is set to 0 if negative. Defaults to True.

Returns:

_type_: hierarchy of the graph