擅长:python、mysql、java
<p>通过将params属性设置为训练集中所有唯一值的集合,我解决了这个问题。在</p>
<pre><code>param=set(train.ravel())
model=hmm.GaussianHMM(n_components=6, covariance_type="full", n_iter=100,params=param)
</code></pre>
<p>train是我用来匹配模型的numpy数组的列表。在</p>
<p>初始参数设置为所有ascii字符的字符串。在</p>