Browse Source

cmProc.c: Chnaged labs() to fabs() in calc of 'dLogProb' in cmChmmTrain().

master
kevin 9 years ago
parent
commit
346915b450
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      cmProc.c

+ 1
- 1
cmProc.c View File

4393
     cmReal_t logProb0 =  cmChmmForward( p, oM, T, alphaM, logPrV );
4393
     cmReal_t logProb0 =  cmChmmForward( p, oM, T, alphaM, logPrV );
4394
 
4394
 
4395
     // check for convergence
4395
     // check for convergence
4396
-    cmReal_t dLogProb =  labs(logProb0-logProb) / ((labs(logProb0)+labs(logProb)+cmReal_EPSILON)/2);
4396
+    cmReal_t dLogProb =  fabs(logProb0-logProb) / ((fabs(logProb0)+fabs(logProb)+cmReal_EPSILON)/2);
4397
     if( dLogProb < thresh )
4397
     if( dLogProb < thresh )
4398
       break;
4398
       break;
4399
 
4399
 

Loading…
Cancel
Save