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

hmmFitEm can crash with discrete observations r2055 #3

Closed
GoogleCodeExporter opened this issue Apr 23, 2016 · 3 comments
Closed

hmmFitEm can crash with discrete observations r2055 #3

GoogleCodeExporter opened this issue Apr 23, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Set len to 101 in hmmDiscreteFitTest
2. Run the demo

From Nachi Sahoo:

hmmFitEM.m, line 207-209: it is relying on a hard clustering
assignment to initialize transition probability matrix. Sometimes the
initial clustering gets a fewer number of clusters than the number of
states in hmm. So, the transition probability matrix formed on line
209 is smaller than it should be. One way to fix it is to change line
209 from
        A      = accumarray([z(1:end-1), z(2:end)], 1);
to
        A      = accumarray([z(1:end-1), z(2:end)], 1, [nstates,
nstates]);

Since, we'd know the number of states at this point. It ensures that
we'd have the correct sized transition matrix.


Original issue reported on code.google.com by mattbdun...@gmail.com on 8 Aug 2010 at 4:08

@GoogleCodeExporter
Copy link
Author

Original comment by mattbdun...@gmail.com on 8 Aug 2010 at 4:09

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

this has been fixed in r2056

Original comment by mattbdun...@gmail.com on 8 Aug 2010 at 4:10

@GoogleCodeExporter
Copy link
Author

Original comment by mattbdun...@gmail.com on 11 Aug 2010 at 1:53

  • Changed state: Fixed

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

No branches or pull requests

1 participant