gsnn.interpret.plot_explanation_graph
Functions
|
Adjust label positions to avoid overlap using bounding boxes. |
|
Check if two bounding boxes overlap. |
|
|
|
- gsnn.interpret.plot_explanation_graph.adjust_label_positions(pos, labels, scale_factor=300, shift_margin=1, hy=15, max_iters=1000)[source]
Adjust label positions to avoid overlap using bounding boxes.
Parameters: - pos: dict, node positions - labels: dict, node labels - scale_factor: float, factor to scale bounding box based on label length - shift_margin: float, margin to shift labels up/down to resolve overlap
Returns: - new_pos: dict, adjusted label positions
- gsnn.interpret.plot_explanation_graph.bounding_box_overlap(box1, box2)[source]
Check if two bounding boxes overlap.