Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.1k views
in Technique[技术] by (71.8m points)

python - Hmmlearn with absorbing state

I am trying to build a Gaussian HMM model with an absorbing state. Is there a way to specify the identity distribution of state 4, the absorbing state? In my dataset values range from 20 to 100 and I have tried to give it the '999' value, but results are not convincing.

    model = hmm.GaussianHMM(n_components=4, n_iter=5000, tol=1e-8, 
                covariance_type="diag", init_params="sc")
    
    model.means_ = np.array([[70, 100], [70, 50], [50,20], [999, 999]])
   
    model.transmat_ = np.array([[0.6, 0.2, 0.1, 0.1],
                                [0.1, 0.6, 0.1, 0.2],
                                [0, 0.2, 0.5, 0.3],
                                [0, 0, 0, 1]])   
    
    model.fit (X_train, lenghts)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...