plot_interaction_subnetwork#
Warning
The code reference is a work in progress and may contain inconsistencies.
- socialnet.plot.plot_interaction_subnetwork(model_folder: Path | str, attention: bool = False)[source]#
Plots the probability (logit) of the focal animal turning right resulting from the pair-interaction subnetwork of the attention network, as a function of the orientation of the neighbour with respect to the focal (θi) and the speed of the neighbour (vi).
Example output.#
- Parameters:
model_folder (Path | str) – Path to the session folder containing the trained model.
attention (bool, optional) – If True, plots the output of the attention subnetwork instead of the pairwise subnetwork. Default is False.
- Returns:
The function saves the generated figure to disk and does not return anything.
- Return type:
None
Notes
The resulting figure is a grid of contour plots, where each subplot corresponds to a different spatial configuration (x, y) of the neighbour relative to the focal animal. The x-axis of each subplot is the orientation θi (in radians), and the y-axis is the neighbour’s speed vi (in BL/s). The color indicates the logit of the probability that the focal fish turns right after 1 second.