Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time-varying C matrix? #162

Open
jmasis opened this issue Jun 27, 2023 · 1 comment
Open

Time-varying C matrix? #162

jmasis opened this issue Jun 27, 2023 · 1 comment

Comments

@jmasis
Copy link

jmasis commented Jun 27, 2023

Hi there,

Is it currently possible to fit data with a time-varying observation matrix?

I have a simple bandit-type experiment I'm trying to fit with a Kalman filter where subjects choose one of two bandits on every trial and then perform a task linked to that bandit. This means that on every trial, I can only observe the choice and the result from one of the bandits and there are missing values for the other bandit. To fit both bandits jointly (because I'm interested in how performance in the tasks influences the choice of bandit on the following trial), I thought I could have a time-varying observation matrix. I know that the pykalman package allows this, but I'd like to use ssm if I can.

If this isn't currently possible, is there a fairly simple way to implement it?

Thank you!

Javier

@slinderman
Copy link
Collaborator

The low level Kalman filtering/smoothing algorithms do support time-varying emission matrices. If you already know the C matrices (and other LDS parameters) for each time step, you can call those functions to infer the latent states given observations.

If you need to estimate the emission matrices, then you'll have to implement a more sophisticated model. Please let me know if that answers the question!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants