Numerical Recipes Forum  

Go Back   Numerical Recipes Forum > Numerical Recipes Third Edition Forum > Methods: All Chapters in NR3

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-01-2010, 11:22 AM
tbegg tbegg is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
16.3.1 Hidden Markov Models

Fragile code in forwardbackward(). I know NR III is not meant to be production code and this problem is exercised by rows or columns of alpha or beta being all 0 due to Baum-Welch and peculiar observation data. But the loop while (lhood < BIGI) {lhood *= BIG; lrnrm++}; will not terminate if lhood is exactly 0. Should perhaps only enter loop if lhood != 0.0. I personally think is better to return infinite results than loop indefinitely. Sorry if this is an old thread.
Reply With Quote
  #2  
Old 07-01-2010, 11:25 AM
tbegg tbegg is offline
Registered User
 
Join Date: Jun 2010
Posts: 3
16.3.1 Hidden Markov Models

Apologies. I mean a or b having rows or columns 0, not alpha or beta, due to Baum-Welch and peculiar observation vector.
Reply With Quote
  #3  
Old 08-17-2010, 05:00 PM
Bill Press Bill Press is offline
Numerical Recipes Author
 
Join Date: Jan 2002
Posts: 227
Yes, you are right. Thanks for finding this. The fix is now posted here.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:51 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.