Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: cannot import name hmm

I cant import hmm module from sklearn.

from sklearn import hmm

I get error :

ImportError: cannot import name hmm
like image 806
aman Avatar asked Sep 12 '25 20:09

aman


2 Answers

I don't know if you found a solution to your problem.

You can install and implement your HMM using hmmlearn.

It can be installed easily with a pip install hmmlearn.

To quote Scikit-learn,

Warning The sklearn.hmm module has now been deprecated due to it no longer matching the scope and the API of the project. It is scheduled for removal in the 0.17 release of the project. This module has been moved to a seperate repository: https://github.com/hmmlearn/hmmlearn

like image 74
Pragyaditya Das Avatar answered Sep 14 '25 17:09

Pragyaditya Das


According to the Hidden Markov Models site here, the sklearn.hmm module has been deprecated and is scheduled for removal in the 0.17. Confirm that your scikit-learn is at least version 0.16.1 because from 0.17 you won't have sklearn.hmm.

like image 21
ishmaelMakitla Avatar answered Sep 14 '25 17:09

ishmaelMakitla



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!