replay_trajectory_classification.continuous_state_transitions.EmpiricalMovement#

class EmpiricalMovement(environment_name: str = '', encoding_group: str | None = None, speedup: int = 1)[source]#

Bases: object

A transition matrix trained on the animal’s actual movement

environment_name#

Name of environment to fit

Type:

str, optional

encoding_group#

Name of encoding group to fit

Type:

str, optional

speedup#

Used to make the empirical transition matrix “faster”, means allowing for all the same transitions made by the animal but sped up by speedup times. So speedup​=20 means 20x faster than the animal’s movement.

Type:

int, optional

Attributes:
encoding_group

Methods

make_state_transition(environments, position)

Creates a transition matrix for a given environment.

Methods

make_state_transition

Creates a transition matrix for a given environment.

Attributes

make_state_transition(environments: tuple[Environment], position: ndarray, is_training: ndarray | None = None, encoding_group_labels: ndarray | None = None, environment_labels: ndarray | None = None)[source]#

Creates a transition matrix for a given environment.

Parameters:
  • environments (tuple[Environment]) – The existing environments in the model

  • position (np.ndarray) – Position of the animal

  • is_training (np.ndarray, optional) – Boolean array that determines what data to train the place fields on, by default None

  • encoding_group_labels (np.ndarray, shape (n_time,), optional) – If place fields should correspond to each state, label each time point with the group name For example, Some points could correspond to inbound trajectories and some outbound, by default None

  • environment_labels (np.ndarray, shape (n_time,), optional) – If there are multiple environments, label each time point with the environment name, by default None

Returns:

state_transition_matrix

Return type:

np.ndarray, shape (n_position_bins, n_position_bins)