Comparing K-Nearest Neighbors And Naive Bayes In Real-Time Recommendation Systems
Medarametla Suda Rani, Thallapally Glory
This study evaluates and compares the performance of K-Nearest Neighbors (KNN) and Naive Bayes
(NB) algorithms in the context of real-time recommendation systems. We analyzed several key metrics,
including accuracy, precision, recall, F1 Score, training time, prediction time, and memory usage,
using datasets that simulate user-item interactions. Our findings reveal that KNN, particularly with
k=10k=10k=10, achieves superior accuracy, precision, recall, and F1 Score compared to Naive Bayes,
indicating its effectiveness in delivering relevant recommendations. However, Naive Bayes demonstrates
significant advantages in computational efficiency, with faster training and prediction times, and lower
memory usage. This suggests that while KNN excels in recommendation quality, Naive Bayes is more
resource-efficient. The choice of algorithm depends on the specific needs of the recommendation system,
balancing between accuracy and computational efficiency.