sarcgraph.sg.SarcGraph._prune_graph
- SarcGraph._prune_graph(G, score_threshold=0.1, angle_threshold=1.2)[source]
Prunes the input graph to get rid of invalid or less probable connections.
- Parameters:
G (nx.Graph) – A scored graph of zdiscs clusters
score_threshold (float) – any connection with a score less than the threshold will be removed, by default 0.1
angle_threshold (float) – if a zdisc has two valid connection the angle between must be higher than the theshold, otherwise the connection with a lower score will be removed, by default 1.2 (in radians)
- Return type:
nx.Graph