Comparing the efficiency of K Nearest Neighbor and Naive Bayes for classifying anonymous spam

Kimmi Gupta, L. Godlin Atlas, K. P. Arjun, N. M. Sreenarayanan, Mani Vinoth, G S Pradeep Ghantasala · 2025

Using K Nearest Neighbor instead of Naive Bayes to better detect anonymous spammers is the main goal of the present study. Twenty participants were divided into two categories for the study: one group used K Nearest Neighbor and the other used Naive Bayes. We used Clincalc software to determine the sample size having 80% pretest power, 0.05 degree of significance (alpha), and 95% confidence interval. According to the results, K Nearest Neighbor attained an accuracy rate of 93%, whereas Naive Bayes showed an accuracy rate of about 89%. This proves that K Nearest Neighbor outperforms Naive Bayes in terms of accuracy. The statistical analysis performed using SPSS showed a statistically significant difference between the two approaches, with an independent importance value of less than 0.001 and a p-value less than 0.05.K Nearest Neighbor outperforms Naive Bayes in detecting anonymous spam, according to the results, since it obtains greater accuracy rates.

Read the paper · More papers on PaperTik