osl_dynamics.simulation.MDynHMM#
- class osl_dynamics.simulation.MDynHMM(trans_prob, stay_prob=None, n_states=None)#
Two independent HMMs for multi-time-scale dynamics.
The first HMM (
alpha_hmm) gives the time course of the means and standard deviations, the second (beta_hmm) gives the time course of the correlations. SeeMDyn_MVN.- Parameters:
- trans_probnp.ndarray or str
Transition probability matrix of both HMMs. See
HMM.- stay_probfloat, optional
Used to generate the transition probability matrix if
trans_probis astr.- n_statesint, optional
Number of states.
- alpha_hmm#
- beta_hmm#
- n_states#
- generate_states(n_samples)#
Generate the two state time courses.
- Parameters:
- n_samplesint
Number of samples.
- Returns:
- state_time_coursesnp.ndarray
Shape is (2, n_samples, n_states).