Comparison Analysis of K-Nearest Neighbor and Naïve Bayes Methods in Classifying Academic Reference Books - Chandra Panca Wibawa; Heny Pratiwi; Andi Yusika Rangan (P3KM Politeknik Pertanian Negeri Samarinda, 2025)
This study compares the performance of the K-Nearest Neighbor (KNN) and Multinomial Naïve Bayes (MNB) algorithms in classifying academic reference books based on their titles within the STMIK Widya Cipta Dharma library system. A dataset consisting of 2,153 cleaned book records was processed using the Knowledge Discovery in Databases (KDD) framework, including data selection, preprocessing, transformation, and classification. Book titles were normalized and transformed into numerical features using TF-IDF with unigram and bigram extraction. The dataset was split using a 75%–25% ratio, resulting in 1,614 training samples and 539 testing samples. Experimental results show that the KNN classifier achieves an accuracy of 72.72%, outperforming Multinomial Naïve Bayes with an accuracy of 62.70%. Confusion matrix analysis shows that KNN correctly classifies more book titles across categories. The superior performance of KNN is attributed to the sparse and short-text nature of book titles, which benefits distance-based similarity. These findings highlight the potential of machine-learning-based automated classification to improve cataloging and information retrieval in academic libraries.