作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
HMM 存在三个基本问题:
问题1和问题3可以通过sklearn HMM解决 tutorial 。但是我们如何使用sklearn来解决问题2呢?
最佳答案
使用score()函数。从代码来看:
def score(self, X, lengths=None):
"""Compute the log probability under the model.
Parameters
----------
X : array-like, shape (n_samples, n_features)
Feature matrix of individual samples.
lengths : array-like of integers, shape (n_sequences, ), optional
Lengths of the individual sequences in ``X``. The sum of
these should be ``n_samples``.
Returns
-------
logprob : float
Log likelihood of ``X``.
关于python - 如何使用sklearn HMM计算观测数据的似然度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40712577/
我是一名优秀的程序员,十分优秀!