定义可能是错误的,如果是这样,请纠正我。我需要从以下类型的矩阵生成马尔可夫模型:
four two "e"
four two "e"
three three "e"
one three "e"
zero six one zero "e"
two two "e"
two two "e"
two two "e"
two two "e"
two two "e"
four zero "e"
two two "e"
three one three "e"
three "e"
four one "e"
three one "e"
two one one zero two "e"
two five "e"
three four two "e"
zero five "e"
three "e"
three three "e"
three "e"
one one "e"
three two "e"
one one "e"
three two zero zero zero "e"
three three "e"
three one "e"
three two "e"
我需要输出类似于: {"four":[{2:"two", 3:"one",2:"exit"},{...}],"three":[{.. .}]}
上面的数字基本上是转换到特定状态的次数。
我为此使用python。
回答常见的问题“您尝试过什么?”:“我尝试了几种方法,但它们并没有完全交付,所以我希望其中一个答案有助于澄清一些事情”。
非常感谢。
编辑,更新以显示完整的矩阵。