def _market_hmm_example():
 states = [u'bull', u'bear', u'static']
 symbols = [u'up', u'down', u'unchanged']
 A = np.array([[0.6, 0.2, 0.2], [0.5, 0.3, 0.2], [0.4, 0.1, 0.5]], np.float64)
 B = np.array([[0.7, 0.1, 0.2], [0.1, 0.6, 0.3], [0.3, 0.3, 0.4]], np.float64)
 pi = np.array([0.5, 0.2, 0.3], np.float64)
 model = _create_hmm_tagger(states, symbols, A, B, pi)
 return (model, states, symbols)

def _market_hmm_example ( ) : states = [ u'bull' , u'bear' , u'static' ] symbols = [ u'up' , u'down' , u'unchanged' ] A = np . array ( [ [ 0.6 , 0.2 , 0.2 ] , [ 0.5 , 0.3 , 0.2 ] , [ 0.4 , 0.1 , 0.5 ] ] , np . float64 ) B = np . array ( [ [ 0.7 , 0.1 , 0.2 ] , [ 0.1 , 0.6 , 0.3 ] , [ 0.3 , 0.3 , 0.4 ] ] , np . float64 ) pi = np . array ( [ 0.5 , 0.2 , 0.3 ] , np . float64 ) model = _create_hmm_tagger ( states , symbols , A , B , pi ) return ( model , states , symbols )
return an example hmm .