deepof.post_hoc.get_time_on_cluster

deepof.post_hoc.get_time_on_cluster(soft_counts: deepof_table_dict, breaks: deepof_table_dict, normalize: bool = True, reduce_dim: bool = False)

Compute how much each animal spends on each cluster.

Requires a set of cluster assignments and their corresponding breaks.

Parameters:
  • soft_counts (TableDict) – A dictionary of soft counts, where the keys are the names of the experimental conditions, and the values are the soft counts for each condition.

  • breaks (TableDict) – A dictionary of breaks, where the keys are the names of the experimental conditions, and the values are the breaks for each condition.

  • normalize (bool) – Whether to normalize the time by the total number of frames in each condition.

  • reduce_dim (bool) – Whether to reduce the dimensionality of the embeddings to 2D. If False, the embeddings are kept in their original dimensionality.

Returns:

A dataframe with the time spent on each cluster for each experiment.