Naive Byes text classification gives different result from hand computed

r

#1

Hi,

Naive byes text classification seems to be incorrect. Classification is different from hand computed. Kindly refer to code present in below link.

http://discuss.analyticsvidhya.com/t/r-text-navie-byes-same-values-for-class-posterior-probability/6414

<>
Text,Category
laundering laundering laundering,Money laundering
bankfraud bankfraud,Money laundering
terrorist terrorist terrorist terrorist,Terrorist Financing
weapon weapon,Terrorist Financing
bribe bribe bribe bribe bribe,Bribery and Corruption
corrupt corrupt corrupt,Bribery and Corruption

<>
laundering terrorist terrorist

Hand calculated naive byes classifies test data as “Terrorist Financing” (which is correct) while R classifies as “Money laundering” (which is wrong)

Attached are computed values.blogpostnb1.zip (1.2 KB)