我在http://www.chokkan.org/software/crfsuite/tutorial.html中使用的是CRFSuite包
我已经成功地使用它构建了一个分类器和标记文本。然而,我想知道我是否可以得到它所做的每个预测的置信度?
看起来并非如此。我真正想要的是得到一个单词是每种类型标签('PER','LOC','MISC‘等)的概率,而不仅仅是预测本身。
发布于 2015-09-18 06:25:48
API提供了提取条件概率的功能。我猜你的意思是crfsuite二进制文件没有这个选项。您可以编辑源代码并自行添加选项
发布于 2020-09-16 02:50:25
我希望这可以作为一个答案。Sklearn crfsuite为每个标签提供概率。
predict_marginals(X)
Make a prediction.
Parameters: X (list of lists of dicts) – feature dicts in python-crfsuite format
Returns: y – predicted probabilities for each label at each position
Return type: list of lists of dictshttps://stackoverflow.com/questions/28083560
复制相似问题