lindermanlab / ssm

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

pass input size M when creating mp emissions models, so F is right shape #128

Closed orrenkt closed 3 years ago

orrenkt commented 3 years ago

Code otherwise breaks when making an mp-SLDS with inputs with size > 1

davidzoltowski commented 3 years ago

Hi @slinderman and @jglaser2, @orrenkt and I were running into an issue when fitting multi-region models with inputs. The emission parameter F that captures input dependence would be initialized to the wrong size. Here we propose a fix by passing the input size M when initializing the emission models that make up the compound emission.

Can you take a look and see if this is the right solution?

jglaser2 commented 3 years ago

That looks right to me (although I haven't run the updated code). I hadn't been running the multipop extensions with inputs, so thanks for updating that.