Why +1 when calculating the ratio of positive divided by negative counts

image
May I ask why +1 is useful here? Is this for smoothing something? Can someone please gives an example of why this would be helpful? Thank you :slight_smile:

Hi @hknguyen20

Yes. Think when neg_words has a value of 0 then +1 helps ratio not be undefined.

1 Like

Oh, that’s so simple :))) I should’ve thought of that thank you!

1 Like