Problem with Precision floating point operation in C

前端 未结 6 1985
执笔经年
执笔经年 2021-01-31 21:03

For one of my course project I started implementing \"Naive Bayesian classifier\" in C. My project is to implement a document classifier application (especially Spam) using huge

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-31 21:44

    You can use probability in percents or promiles:

    doc_spam_prob= (numerator*100/(denom1+denom2));
    

    or

    doc_spam_prob= (numerator*1000/(denom1+denom2));
    

    or use some other coefficient

提交回复
热议问题