ARTICLE

From Spore to Score: Performance Analysis of Naive Bayes and K-Nearest Neighbors on the UCI Mushroom Classification Dataset

Melca M. Abogado, Gardenia B. Concillo, Hazel D. Bantugan, Jose C. Agoylo Jr., Jimson A. Olaybar, Joedee Mark Rodriguez


© 2026 Jose C. Agoylo Jr., published by UIKTEN. This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 International. (CC BY-NC 4.0).

Citation Information: SAR Journal. Volume 9, Issue 2, Pages 145-150, ISSN 2619-9955, https://doi.org/10.18421/SAR92-07, June 2026.

Received: 05 May 2026
Revised: 17 June 2026.
Accepted: 22 June 2026.
Published: 27 June 2026.

Abstract:

This study used two machine learning algorithms (Naive – Bayes & K-Nearest Neighbors (KNN)) to predict whether a mushroom is edible or not, based on its morphological features. The study attempts to use a public mushroom dataset containing 8,124 instances and 22 categorical attributes to determine the model that can show more accuracy and reliability in the classification of mushrooms as edible or poisonous. Pre-processed data was used, and the results showed that the KNN classifies with an accuracy of 99.63% whereas the Naive Bayes classifies with an accuracy of 92.18%, which is still a good result, although lower than that of KNN. These results indicate that KNN performs effectively on the selected benchmark dataset and may serve as a useful baseline approach for future mushroom classification studies.


Keywords – mushroom classification, Naive Bayes, K-Nearest Neighbors (KNN), predictive modeling, edibility prediction, Machine learning.

                   

                                                                      Full text PDF