Abstract
Mushrooms have various health benefits, including being a rich source of antioxidants. Mushrooms include both edible and poisonous varieties. Differentiating between these two is not an easy task and requires expertise. Machine learning (ML) offers an accurate and highly promising technique or tool to identify mushrooms based on their physical characteristics. The mushroom dataset, containing 22 morphological features, was obtained from the Irvine Machine Learning Repository, University of California. An open-source low-code ML library called PyCaret was explored for the best-performing classification model. The model's effectiveness was evaluated through different evaluation metrices such as accuracy, precision, recall, F1-score, area under the curve, Kappa, and the Matthews correlation coefficient. Among the fifteen tested ML algorithms, the eight namely Random Forest, AdaBoost, Gradient Boosting, Extra Trees, Extreme Gradient Boosting and Light Gradient Boosting Machine, Decision Tree and K-Nearest Neighbour were identified for accurate and correct classification to distinguish edible and poisonous mushrooms. Out of eight algorithms, the best model obtained through PyCaret was the Random Forest. Furthermore, to improve prediction, a feature importance analysis was carried out with the following key features such as odor, gill-size, gill-color, spore-print-color, ring-type, population, stalk-root, stalk-surface-above-ring, bruises, and stalk-surface-below-ring. To visualize the effect of individual feature's importance, Shapley additive explanations were performed.