plot_aggregation_subnetwork#
Warning
The code reference is a work in progress and may contain inconsistencies.
- socialnet.plot.plot_aggregation_subnetwork(model_folder: Path | str, fig_vars: Sequence[str], one_neighbour: bool = True, save_folder: Path | None = None, fig_name_suffix: str = '', mesh_kwargs: dict | None = None)[source]#
Visualizes the aggregation subnetwork of the model by plotting how weights vary as a function of the specified variables. The resulting figure is a grid of contour plots, with axes and titles determined by fig_vars.
Example output with variables
fv nbv nbx nby.#- Parameters:
model_folder (Path | str) – Path to the session folder containing the trained model.
fig_vars (Sequence[str]) – Variables to use in the map plot, in the order [row_variable, col_variable, x_variable, y_variable]. These determine the axes and grid of the subplots.
one_neighbour (bool, optional) – If True, sets the number of neighbours to 1 when loading the model. If False, uses the default. Default is True.
save_folder (Path | None, optional) – Folder to save the resulting figure. If None, saves to model_folder. Default is None.
fig_name_suffix (str, optional) – Suffix to append to the saved figure filename. Default is “”.
mesh_kwargs (dict | None, optional) – Additional keyword arguments for mesh generation (e.g., resolution). Default is None.
- Returns:
The function saves the generated figure to disk and does not return anything.
- Return type:
None