如何在 Latex 或 Graphviz 中可视化 Viterbi 路径 [英] How to visualize Viterbi path in Latex or Graphviz
本文介绍了如何在 Latex 或 Graphviz 中可视化 Viterbi 路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一种在 LaTeX 或 Graphviz 中可视化 Viterbi 路径的方法,就像在这个例子中一样:
I'm looking for a way to visualize a Viterbi path in LaTeX or maybe Graphviz, much like in this example:
它不一定是点,但也可以是行之间的实际值.很像一个在单元格之间有线条的表格.
It doesn't have to be dots, but it could also be actual values between the lines. Much like a table with lines between cells.
我尝试寻找方法来做到这一点,但很可能我没有使用正确的关键字.
I tried searching for ways to do this, but most likely I'm not using the right keywords.
推荐答案
这是使用带有不可见边缘的 graphviz 实现此目的的一种方法:
Here's one way to achieve this using graphviz with invisible edges:
graph {
splines=false;
nodesep=0.5;
ranksep=0.5;
node[shape=point, height=0.08];
{ rank=same; a1 -- b1 -- c1 -- d1 -- e1;}
{ rank=same; a2 -- b2; b2 -- c2[style=invis]; c2 -- d2; d2 -- e2[style=invis];}
{ rank=same; a3 -- b3[style=invis]; b3 -- c3; c3 -- d3[style=invis]; d3 -- e3;}
edge[style=invis];
a1 -- a2 -- a3;
b1 -- b2 -- b3;
c1 -- c2 -- c3;
d1 -- d2 -- d3;
e1 -- e2 -- e3;
edge[style=solid, constraint=false];
a2 -- b3 -- c2 -- d3 -- e2;
}
这篇关于如何在 Latex 或 Graphviz 中可视化 Viterbi 路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文