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

Getting information out after model fitting #13

Open
eliotmoss opened this issue May 14, 2017 · 4 comments
Open

Getting information out after model fitting #13

eliotmoss opened this issue May 14, 2017 · 4 comments

Comments

@eliotmoss
Copy link

Thank you for the assistance figuring out installation and building. I can run the pyslds examples under python2 now (under python3 they run, but the graphics don't pop up).

I am able to take one of my time series, build a model, and plot observations and smoothed observations. Yay!

What I have not been able to figure out is how to get the trained A, B, etc., matrices out, or how to make a display similar to (say) the evolution of the Lorentz attractor or a display of what is happening in phase space (the latent dimensions).

Do you have examples of how to get at that information and to plot it? Seeing phase space evolution with colored dots (different colors for different states) would help me see what my models are extracting from the data, etc. As it stands I don't understand your layers of code well enough to do this ...

@slinderman
Copy link
Collaborator

Glad that it's running now! Perhaps the easier way to get this is to look in model.states_list, which contains a list of _SLDSStates objects, one for each dataset you've added to the model. Inside the states object you'll find the following fields:

  • stateseq : the discrete state for each time
  • gaussian_states : the continuous states for each time
  • As, Bs, Cs, Ds, etc : stacks of dynamics matrices used at each point in time. I realize this is a bit indirect. If you look at the states code (https://github.com/mattjj/pyslds/blob/master/pyslds/states.py#L131) you can see how to get the dynamics for each discrete latent state.

We should add these dynamics properties directly to the model. That would make this easier.

@eliotmoss
Copy link
Author

eliotmoss commented May 14, 2017 via email

@slinderman
Copy link
Collaborator

slinderman commented May 16, 2017 via email

@eliotmoss
Copy link
Author

eliotmoss commented May 16, 2017 via email

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