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

Explained variance for the rSLDS latents #159

Open
neven-x opened this issue Apr 11, 2023 · 3 comments
Open

Explained variance for the rSLDS latents #159

neven-x opened this issue Apr 11, 2023 · 3 comments

Comments

@neven-x
Copy link

neven-x commented Apr 11, 2023

Hi, I am trying to get the explained variance from the continuous states of an rSLDS model, but I can't identify this from the model attributes. The alternative is predicting the original data from the latent embedding, but I can't find a prediction method in the class or the neuron loadings for the latents so I could reconstruct the original data myself. What am I missing?

Thanks!

@juliagorman
Copy link

Hi, I have the same question. Were you able to figure it out?

@slinderman
Copy link
Collaborator

There isn't a built in function to report the fraction of explained variance, unfortunately. The subtle issue is that unlike in a linear regression model where you have covariates x and responses y, in a state space model you don't know the latent states, x. One simple though admittedly imperfect approach is to infer the most likely latent states (or the posterior mean) using the available SSM functions, and then compute the R^2 using that point estimate of x.

@slinderman
Copy link
Collaborator

Tagging @adityanairneuro to weigh in on the analyses in his Cell paper.

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

3 participants