osl_dynamics.simulation.obs_mod.ObservationModel#

class osl_dynamics.simulation.obs_mod.ObservationModel#

Base class for observation models.

Subclasses set self._n (the number of states or modes) when it can be inferred from the parameters, and implement _create_parameters (generate any random parameters) and simulate_data. A model with session-specific parameters also sets self.n_sessions and implements simulate_session_data. rescale updates the ground truth parameters after the data are standardized.

initialize(n=None)#

Set the number of states or modes and generate random parameters.

Parameters:
nint, optional

Number of states or modes. Must match the parameter arrays if they were passed.

abstractmethod simulate_data(time_course)#
rescale(mu, sigma)#

Update the parameters after the data are standardized.

Parameters:
munp.ndarray

Mean subtracted from each channel.

sigmanp.ndarray

Standard deviation each channel was divided by.