如何在Python中可视化隐藏的马尔可夫模型? [英] How to visualize a hidden Markov model in Python?

查看:230
本文介绍了如何在Python中可视化隐藏的马尔可夫模型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我认为这个问题很清楚。我想在Python中创建一个隐藏的马尔可夫模型,并绘制它的vizualization模型。所以,它就像这样:





是否有任何模块可以做到这一点?虽然我从来没有使用过隐马尔可夫模型,但是当我需要可视化的时候一个图表(带标签,颜色等),我使用 Gephi ,一个GUI图形浏览器/编辑器并生成图形编程为 GraphML 文件,这是一种基于XML的格式。 Python具有良好的XML处理工具(位于标准库 lxml )。 Gephi将一些< data> 子元素识别为节点和边的位置,颜色和标签。


I think the question is clear enough. I want to make a hidden Markov model in Python and draw a vizualization model of it. So, it's something like this picture:

Is there any module to do that? I've googled it and found nothing.

解决方案

Though I've never worked with Hidden Markov Models, when I need to visualize a graph (directed, with labels, colors, etc.), I use Gephi, a GUI graph browser/editor and generate the graphs programmatically as GraphML files, which is an XML-based format. Python has good XML-handling tools (in the standard library and lxml). Gephi recognizes some of the <data> sub-elements as positions, colors, and labels for nodes and edges.

这篇关于如何在Python中可视化隐藏的马尔可夫模型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆