Edibility detection of mushroom using Logistic Regression and PCA

Sai Charan Gangu, Madhu Nitesh Bandi, Dr Sangeeta Viswanadham, Chintala Chandrasekhar Sivaji, Toyaka Sai Kiran


Mushroom is found to be one of the best nutritional foods with high proteins, vitamins and minerals. Only some of the mushroom varieties were found to be edible. Some of them are dangerous to consume. To distinguish between the edible and poisonous mushrooms, we use machine learning algorithms to classify them. Classification is performed using various machine learning classifiers and Logistic regression showed better results compared to other algorithms. A survey of various algorithms resulted in KNN giving an accuracy of 100% at k=1 using 800 samples. A change k value is leading to a decrease in accuracy. By using hybrid algorithms (i.e., using two or more algorithms) which includes a combination of dimensionality reduction techniques such as Linear Discriminant Analysis(LDA) and Principal Component Analysis(PCA) along with existing classifiers better performance is achieved. Logistic Regression along with Principal Component Analysis is used to increase the accuracy. The results are shown in form of bar plots.


Mushrooms, Poisonous, Classification, Logistic Regression, Linear Discriminant Analysis, Principal Component Analysis, Bar plot.

Full Text:



Verma, S. K., & Dutta, M. (2018). Mushroom classification using ANN and ANFIS algorithm. IOSR Journal of Engineering (IOSRJEN), 8(01), 94-100.

Chelliah, B. J., Kalaiarasi, S., Anand, A., Janakiram, G., Rathi, B., & Warrier, N. K. (2018). Classification of Mushrooms using Supervised Learning Models. International Journal of Emerging Technologies in Engineering Research(IJETER),6(4).

Ottom, Mohammad Ashraf. (2019). Classification of Mushroom Fungi Using Machine Learning Techniques. International Journal of Advanced Trends in Computer Science and Engineering,8(5),2378-2385. 10.30534/ijatcse/2019/78852019.

Balakrishnama, S., & Ganapathiraju, A. (1998). Linear discriminant analysis-a brief tutorial. Institute for Signal and information Processing, 18, 1-8.

Tony Cai, T., & Zhang, L. (2019). High dimensional linear discriminant analysis: optimality, adaptive algorithm and missing data. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 81(4), 675-705.

Miles, P. G. & Chang, S.-T. Mushroom Biology: Concise Basics and Current Developments (World Scientifc, 1997).

Lincof, G. Field Guide to North American Mushrooms. National Audubon Society (Alfred A. Knopf, 1997).

Jong, S. & Birmingham, J. Medicinal benefts of the mushroom ganoderma. In Advances in Applied Microbiology, vol. 37, 101–134 (Elsevier, 1992).

Heinemann, P. H. et al. Grading of mushrooms using a machine vision system. Trans. ASAE 37, 1671–1677 (1994).

Ottom, M. A., Alawad, N. A. & Nahar, K. M. Classifcation of mushroom fungi using machine learning techniques. Int. J. Adv. Trends Comput. Sci. Eng. 8, 2378–2385 (2019).

Maurya, P. & Singh, N. P. Mushroom classifcation using feature-based machine learning approach. In Proceedings of 3rd International Conference on Computer Vision and Image Processing, 197–206 (Springer, 2020).

Wang, Y., Du, J., Zhang, H. & Yang, X. Mushroom toxicity recognition based on multigrained cascade forest. Sci. Program. 2020, 8849011 (2020).

Schlimmer, J. Mushroom Data Set (1987).

DOI: https://doi.org/10.26483/ijarcs.v13i3.6830


  • There are currently no refbacks.

Copyright (c) 2022 International Journal of Advanced Research in Computer Science