Mushroom Classification between Poisonous and Edible Mushrooms Using Machine Learning Techniques

Main Article Content

Phiromporn Tianmitrapap
Waraporn Viyanon

Abstract

Traditional methods of identifying poisonous mushrooms can be both inaccurate and time consuming. The most common approach involves visually inspecting the mushroom's physical characteristics, which can be labor-intensive and challenging. This study investigated the use of machine learning techniques to classify mushrooms into two categories: edible and poisonous. A public dataset of 8,124 gilled mushrooms from 23 species within the Agaricus and Leiota genera was used to train five machine learning models: logistic regression, support vector machines (SVMs), decision trees, random forests, and XGBoost. Feature selection and extraction technique were applied to identify the most important attributes for classifying mushroom species. The results indicated that
the decision tree model, coupled with recursive feature elimination (RFE), achieved the best performance when using 60% of the data and focusing on three features: odor, gill size, and spore print color. This model produced an F1 score of 99.32%. Based on these finding, a prototype web application was developed for potential future use.

Article Details

Section
Engineering and Architecture

References

Sakonrak, B., Duangkae, K., Ayawong, J., Pongpanich, K. and Khemaman, W., 2006, Gilled mushrooms: kaeng krachan forest complex chiang dao wildlife sanctuary and phu khieo wildlife sanctuary, Forest conservation research division forest and plant conservation research office department of national parks, Wildlife and plant conservation, Bangkok, 240 p. (in Thai)

Boonpratuang, T., Choeyklin, R., Promkiam-on, P. and Tiyaphan, P., 2012, The identification of poisonous mushrooms in Thailand during 2008-2012, Thai mushroom 2555, pp. 6-13. (in Thai)

Nooron, N., Parnmen, S., Sikaphan, S., Leudang, S., Uttawichai, C. and Polputpisatkul, D., 2020, The situation of mushrooms food poisoning in Thailand: Symptoms and common species list, Thai J Toxicol. 35(2): 58–69.

Islam, M.D., 2015, Cultivation techniques of edible mushrooms: Agaricus bisporus, Pleurotus spp., Lentinula edodes and Volvariella volvocea, Available source: https://www.researchgate.net/publication/ 275179411_Cultivation_Techniques_of_Edible_Mushrooms_Agaricus_bisporus_Pleurotus_spp_Lentinula_edodes_and_Volvariella_volvocea, Sep 22, 2022.

Verma, S. and Dutta, M., 2018, Mushroom classification using ANN and ANFIS algorithm, (IOSRJEN), 8(1): 26-32.

Chitayae, N. and Sunyoto, A., 2020, Performance comparison of mushroom types classification using k-nearest neighbor method and decision tree method, In 2020 3rd international conference on information and communications technology (ICOIACT), pp. 308-313. IEEE.

Vanitha, V., Ahil, M.N. and Rajathi N., 2020, Classification of mushrooms to detect their edibility based on key attributes, Biosci. Biotech. Res. Asia., 13(11): 37-41.

Schlimmer, J., Mushroom data set, machine learning repository, Available source: https://archive.ics.uci.edu/ml/datasets/Mushroom, Sep 22, 2022.

Agarwal, D., 2021, Introduction to SVM (Support vector machine) along with python code, Data science blogathon, Available source: https://www.analyticsvidhya.com/blog/2021/04/insight-into-svm-support-vector-machine-along-with-code/, Oct 12, 2022.

Saini, A., 2021, Decision tree algorithm – A complete guide, Data science blogathon, Available source: https://www.analyticsvidhya.com/blog/2021/08/decision-tree-algorithm/, Oct 12, 2022

What is a random forest?, TIBCO software inc, Available source: https://www.tibco.com/reference-center/what-is-a-random-forest, Oct 12, 2022.

Mariajesusbigml. Introduction to boosted trees, Available source: https://blog.bigml.com/2017/03/14/ introduction-to-boosted-trees/, Oct 12, 2022.

Brownlee, J., How to choose a feature selection method for machine learning, Machine learning mastery, Available source: https://machinelearningmastery.com/feature-selection-with-real-and-categorical-data/, Oct 12, 2022

Hira, Z.M. and Gillies, D.F., 2015, A review of feature selection and feature extraction methods applied on microarray data, Adv. Bioinform., 2015: 1-13.

Sagrawal, S.K., Metrics to evaluate your classification model to take the right decisions, Analytics vidhya, Available source: https://www.analyticsvidhya.com/blog/2021/07/metrics-to-evaluate-your-classification-model-to-take-the-right-decisions/, Oct 12, 2022.

Streamlit documentation, Streamlit inc, Available source: https://docs.streamlit.io/, Feb 15, 2023.