deepof.visuals.plot_stationary_entropy
- deepof.visuals.plot_stationary_entropy(coordinates: deepof_coordinates, embeddings: deepof_table_dict, soft_counts: deepof_table_dict, bin_size: int | str | None = None, bin_index: int | str | None = None, precomputed_bins: ndarray | None = None, samples_max=20000, roi_number: int | None = None, animals_in_roi: list | None = None, in_roi_criterion: str = 'Center', add_stats: str = 'Mann-Whitney', exp_condition: str | None = None, verbose: bool = False, ax: Any | None = None, save: bool = False)
Compute and plots transition stationary distribution entropy per condition.
- Parameters:
coordinates (coordinates) – deepOF project where the data is stored.
embeddings (table_dict) – table dict with neural embeddings per animal experiment across time.
soft_counts (table_dict) – table dict with soft cluster assignments per animal experiment across time.
bin_size (Union[int,str]) – bin size for time filtering.
bin_index (Union[int,str]) – index of the bin of size bin_size to select along the time dimension. Denotes exact start position in the time domain if given as string.
precomputed_bins (np.ndarray) – precomputed time bins. If provided, bin_size and bin_index are ignored.
samples_max (int) – Maximum number of samples taken for plotting to avoid excessive computation times. If the number of rows in a data set exceeds this number the data is downsampled accordingly.
roi_number (int) – Number of the ROI that should be used for the plot (all behavior that occurs outside of the ROI gets excluded)
animals_in_roi (list) – List of ids of the animals that need to be inside of the active ROI. All frames in which any of the given animals are not inside of the ROI get excluded
in_roi_criterion (str) – Criterion for in roi check, can be a single bodypart, a list of bodyparts or “all” bodyparts of a mouse
add_stats (str) – test to use. Mann-Whitney (non-parametric) by default. See statsannotations documentation for details.
exp_condition (str) – Name of the experimental condition to use when plotting. If None (default) the first one available is used.
verbose (bool) – if True, prints test results and p-value cutoffs. False by default.
ax (plt.AxesSubplot) – axes where to plot the current figure. If not provided, new figure will be created.
save (bool) – Saves a time-stamped vectorized version of the figure if True.