Edible mushroom classification using ML techniques.

Mushrooms are tasty.

In the dream of one day going out and forage mushrooms I want to have something with me to predict wether the mushroom I pick would try to kill me or not. So using my infinite wisdom I decided to build ML models to help me identify edible mushrooms instead of reading the government guidelines.

Some techniques being used:

To see the coding Jupiter notebook and the paper or presentation, please scroll down to the bottom.

Exploratory data analysis

The dataset comes from the UCI Machine Learning Repository:

https://archive.ics.uci.edu/dataset/73/mushroom.

  • The data set contains 8124 hypothetic samples of 23 different mushroom species from the Agaricus and Lepiota Family.

  • There are 22 nominal categorical predictor variables and one binary outcome variable, making it highly applicable for one-hot encoding transformation.

Data preprocessing for modeling

Machine Learning Modeling:

Default Naive Bayes

Optimize Naive Bayes

Greedy Naive Bayes

How to make Naive Bayes Greedy:

The making of a paradoxically yet powerful ML model for mushroom classification. Allowing for a highly compact & accurate model, rivaling random forest with the highest accuracy yet only needing 3/22 original variables.

KNN models, are a simple idea with powerful return.

Decision Tree Model

Random Forest Model