Python:无法导入名称hmm

2024-06-08 03:04:40 发布

您现在位置:Python中文网/ 问答频道 /正文

我无法从sklearn导入hmm模块。

from sklearn import hmm

我得到错误:

ImportError: cannot import name hmm

Tags: 模块namefromimport错误sklearnhmmimporterror
2条回答

根据Hidden Markov Models site here,已弃用sklearn.hmm模块,并计划在0.17中删除。确认您的scikit-learn至少是0.16.1版本,因为从0.17开始,您将没有sklearn.hmm

我不知道你是否找到了解决问题的办法。

您可以使用hmmlearn安装和实现您的HMM。

它可以用pip install hmmlearn轻松安装。

引用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

相关问题 更多 >

    热门问题