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

Cross-likelihood validation of syllable uniqueness | Current implementation in moseq2_model.train.util.get_crosslikes #98

Open
X4ndri opened this issue Dec 9, 2024 · 0 comments

Comments

@X4ndri
Copy link

X4ndri commented Dec 9, 2024

This is regarding Cross-likelihood validation as in Figure 2D in the 2015 paper. Where it shows how well the AR parameters of each state are used to explain every the observed variable during each other state. It is already implemented in moseq2-app @ moseq2_model.train.util.get_crosslikes . I can call this method manually as it only requires the arhmm object. However, each instance in the arhmm.states_list, that is, an instance of pyhsmm.internals.hmm_states.HMMStatesEigen corresponding to each session has its cache cleared, meaning that it does not contain the PC data used during training in its .data attribute.

To fix that, I did re-assigned the .data attribute manually for each session's instance. Briefly, I read in the PC scores corresponding to each session, then whiten it using the whitening parameters used during training, then perform AR striding using the used nlags then set it to the HMMStatesEigen.data attribute corresponding to that session. I can then call the get_crosslikes method and get a Cross Likelihood matrix.
However, I am concerned about the resulting matrix, because of the resulting range, I am getting a range of max of 0 and a min of ~-800; See below.

image

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

1 participant