plot_alignment_matrix
- class plot_alignment_matrix(P: Tensor | ndarray, title: str = 'Alignment Matrix', x_label: str = 'Nodes in Graph 2', y_label: str = 'Nodes in Graph 1', cmap: str = 'viridis', figsize: tuple[int, int] = (8, 6), vmax: int | float | None = None, vmin: int | float | None = None, save_path: str | None = None, show: bool = True)[source]
Bases:
Visualize an alignment matrix as a heatmap.
- Parameters:
P (Union[torch.Tensor, np.ndarray]) – The alignment matrix to visualize.
title (str, optional) – Title of the plot. Default is “Alignment Matrix”.
x_label (str, optional) – Label for the x-axis. Default is “Nodes in Graph 2”.
y_label (str, optional) – Label for the y-axis. Default is “Nodes in Graph 1”.
cmap (str, optional) – Colormap to use for the heatmap. Default is “viridis”.
figsize (tuple[int, int], optional) – Size of the figure. Default is (8, 6).
vmax (Optional[Union[int, float]], optional) – Maximum value for colormap scaling. Default is None.
vmin (Optional[Union[int, float]], optional) – Minimum value for colormap scaling. Default is None.
save_path (Union[str, None], optional) – Path to save the plot image. Default is None (not saving).
show (bool, optional) – Whether to display the plot. Default is True.