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

Error with HMM analysis #1

Closed
ffavelar opened this issue Jul 29, 2023 · 1 comment · Fixed by #2
Closed

Error with HMM analysis #1

ffavelar opened this issue Jul 29, 2023 · 1 comment · Fixed by #2
Assignees
Labels
bug Something isn't working

Comments

@ffavelar
Copy link

Discussed in p-j-smith/lipyphilic#117

Originally posted by ffavelar July 25, 2023
I'm trying to run the tutorial of the Hidden Markov Model in Ubuntu 20.04.6 LTS (GNU/Linux 5.15.0-75-generic x86_64) and Python 3.9.10. I get this output:

100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 51/51 [00:01<00:00, 29.28it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 51/51 [00:01<00:00, 46.18it/s]
0%| | 0/3 [00:00<?, ?it/s]
MultinomialHMM has undergone major changes. The previous version was implementing a CategoricalHMM (a special case of MultinomialHMM). This new implementation follows the standard definition for a Multinomial distribution (e.g. as in https://en.wikipedia.org/wiki/Multinomial_distribution). See these issues for details:
hmmlearn/hmmlearn#335
hmmlearn/hmmlearn#340
0%| | 0/3 [00:00<?, ?it/s]
Traceback (most recent call last):
File "HiddenMarkovModel.py", line 370, in
model = model.fit(
File "/home/jorge/.local/lib/python3.9/site-packages/hmmlearn/base.py", line 469, in fit
self._check()
File "/home/jorge/.local/lib/python3.9/site-packages/hmmlearn/hmm.py", line 907, in check
raise ValueError(
ValueError: emissionprob
must have shape (n_components, n_features)

I understand that emissionprob_ does not have the proper shape, but I don't know how to fix the code. Any help will be appreciated.

@p-j-smith p-j-smith transferred this issue from p-j-smith/lipyphilic Jul 30, 2023
@p-j-smith
Copy link
Owner

Thanks for letting me know about this @ffavelar ! I'll update the notebook to use CategoricalHMM rather than MultinomialHMM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants