obvs.vis
Module Contents
Functions
|
Create a heatmap with annotated cells. Set the x_ticks, y_ticks and title accordingly. |
|
Create a line plot of the surprisal values. |
- obvs.vis.create_heatmap(x_data: list[str | int | float], y_data: list[str | int | float], values: list[float], title: str = '', cell_annotations: list[str] = None, x_label: str = '', y_label: str = '') plotly.graph_objects.Figure
Create a heatmap with annotated cells. Set the x_ticks, y_ticks and title accordingly.
- Args:
x_data (list): Data on the x-axis of the heatmap. y_data (list): Data on the y-axis of the heatmap. values (list): Cell values for the heatmap. Should have shape (nxn) title (str): Title for the plot, default = ‘’ cell_annotations (list): Text printed inside the cells.
If given, should have shape (nxn), default = None
x_label (str): Label for the x-axis, default = ‘’ y_label (str): Label for the yaxis, default = ‘’
- Returns:
go.Figure: The heatmap figure.
- obvs.vis.plot_surprisal(layers, values, std=None, title='Surprisal') plotly.graph_objects.Figure
Create a line plot of the surprisal values.
- Args:
surprisal_values (list): The surprisal values. layers (list): The layers. title (str, optional): The title of the plot. Defaults to “Surprisal”.
- Returns:
go.Figure: The bar plot figure.