get_state_durations

behavenet.plotting.arhmm_utils.get_state_durations(latents, hmm, include_edges=True)[source]

Calculate frame count for each state.

Parameters:
  • latents (list of np.ndarray) – latent states

  • hmm (ssm.HMM) – arhmm objecct

  • include_edges (bool) – include states at start and end of chunk

Returns:

number of frames for each state run; list is empty if single-state model

Return type:

list