This project classifies mushrooms as edible (e) or poisonous (p) using supervised machine learning algorithms.
Mushroom poisoning is caused by eating poisonous mushrooms mistaken for edible ones. This system aims to help identify mushrooms accurately to prevent such incidents.
Three machine learning algorithms were implemented and compared:
- Logistic Regression
- Gaussian Naïve Bayes
- Decision Tree Classifier
- Python
- Jupyter Notebook
- Pandas
- NumPy
- Scikit-learn
- Matplotlib
- Seaborn
- Source: UCI Machine Learning Repository (Mushroom Dataset)
- Preprocessing: handled null values, encoded categorical data, scaled features, and split data 80/20 for training/testing.
- Confusion Matrix
- Accuracy
- Precision
- Recall
- F1 Score
- AUC-ROC
| Algorithm | Accuracy | Precision | Recall | F1-Score |
|---|---|---|---|---|
| Logistic Regression | 93% | 94% | 90% | 92% |
| Gaussian Naïve Bayes | ~85% | 86% | 100% | 92% |
| Decision Tree | ~88% | 89% | 89% | 89% |
Best Model: Logistic Regression
pandas
numpy
scikit-learn
matplotlib
seaborn
jupyter