示例#1
0
 def test_baum_welch():
     print '***** Baum-Welch *****'
     print model.baum_welch( [ O ] )
     for i in xrange( 10 ):
         LL = model.baum_welch_iteration( [ O ] )
         print LL
     g_after_bw = hmm.graph_model( model, include_emissions = True )
     g_after_bw.write_graphviz( 'hmm_after_baum_welch.dot' )
     os.system( 'neato hmm_after_baum_welch.dot -Tsvg -o hmm_after_baum_welch.svg -Gscale=overlap -Elen=1.5' )
示例#2
0
 def test_graphing():
     print '***** Graphing *****'
     g = hmm.graph_model( model, include_emissions = True )
     g.write_graphviz( 'hmm.dot' )
     os.system( 'neato hmm.dot -Tsvg -o hmm.svg -Gscale=overlap -Elen=1.5' )
示例#3
0
 def test_graphing():
     print '***** Graphing *****'
     g = hmm.graph_model(model, include_emissions=True)
     g.write_graphviz('hmm.dot')
     os.system('neato hmm.dot -Tsvg -o hmm.svg -Gscale=overlap -Elen=1.5')