lindermanlab / ssm

Bayesian learning and inference for state space models
MIT License
540 stars 196 forks source link

Adding a modified class for a GLM-HMM with different inputs/covariates for observation GLM and transition GLM #166

Open Zeinab-Mohammadi opened 5 months ago

Zeinab-Mohammadi commented 5 months ago

Hi Scott

Hope you are doing well. Thank you for providing this excellent package, and I extend my gratitude to everyone in your lab who collaborated on it. I have included an HMM_TO class (TO stands for Transition and Observation) in which I considered working on a GLM-HMM with inputs of different sizes and different covariates for observation GLM and transition GLM. To use this class, I added two other modified classes: "InputDrivenTransitionsAlternativeFormulation" for transition and "InputDrivenObservationsDiffInputs" for observation. The results of employing this code for our analysis are detailed in our paper where we used an HMM with a multinomial GLM for transitions and a Bernoulli GLM for observations with various inputs. Please note that I added the HMM_TO class alongside the HMM class, without replacing it, to ensure that none of the other notebooks are affected. Additionally, I have attached a notebook script titled "2c-Input-Driven-Transitions-and-Observations-GLM-HMM" that utilizes the mentioned code to implement GLM-HMM as a generative model. It simulates data and performs a recovery analysis to retrieve the generative parameters. Once again, thank you for providing this great package for state space model inference. It was very useful in our analysis. I look forward to your valuable insights and feedback on this pull request.

Best, Zeinab