structify_net.scoring.average_shortest_path_length
- structify_net.scoring.average_shortest_path_length(graph, normalized=True)
The average shortest path length of the graph
If the graph has a giant component, the average shortest path length is computed on the giant component. If normalized is true, compute a normalized version, defined between 0 and 1, where 1 is the shortest possible path length and 0 is the longest possible path length. It is computed as 1/(normalized_shortest+1), where normalized_shortest is the normalized shortest path length, defined as max(0,(graph_shortest-2)).
- Args:
graph (_type_): _description_ normalized (bool, optional): _description_. Defaults to True.
- Returns:
_type_: _description_