1

Closed

LogProbability Issue

description

First thanks for putting this together and having it freely available!
 
I was just going to recommend that you put a check that the probability is not equal to NaN before logging it. Because sometime when running large amount of text through it can complicate things.
 
 
private void LogProbability(float prob)
    {
        if(!float.IsNaN(prob))
        {
            I = I == 0 ? prob : I * prob;
            invI = invI == 0 ? (1 - prob) : invI * (1 - prob);    
        }
    }
Closed Feb 11, 2010 at 7:26 PM by joelmartinez
Resolved with changeset # 41045

comments