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

OrthogonalGaussianEmissions very slow when fitting #90

Open
bantin opened this issue Jan 30, 2020 · 0 comments
Open

OrthogonalGaussianEmissions very slow when fitting #90

bantin opened this issue Jan 30, 2020 · 0 comments

Comments

@bantin
Copy link
Collaborator

bantin commented Jan 30, 2020

Trying to fit a moderately sized dataset (N=218, D=6, 108 trials) with OrthogonalGaussianEmissions is unreasonably slow, taking about 41 seconds per iteration. By contrast, the same model with GaussianEmissions takes about 0.9 seconds per iteration.

@slinderman This is because we don't have a closed form m-step for this emissions class, and so we're defaulting to SGD. The orthogonal C matrices are parameterized by the cayley transform (it's quite clever), and then we take gradients through this transform (instead of on the C matrix itself). If we are willing to live with an approximate m-step, we could probably make this much faster by doing gradient descent on the manifold of orthogonal matrices. It seems like this works quite well and is not too tricky to implement, but it's probably not worth the trouble for now.

One thing I'll do immediately is change the default to be the normal GaussianEmissions, so that users don't end up using the slow version.

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