This project focuses on classifying mushrooms as edible or poisonous based on various physical attributes using supervised machine learning. It includes:
- Full EDA and preprocessing pipeline
- Comparison of multiple classification models
- A deployed Streamlit web application for real-time prediction
├── Mushroom_done.ipynb # Jupyter Notebook with complete ML workflow
├── app.py # Streamlit app for interactive predictions
├── model_with_encoders.pkl # Trained model with label encoders
├── README.md # Project documentation
└── requirements.txt # Dependencies (to be added if deploying)
- Source: UCI Mushroom Dataset
- Rows: ~8,000 samples
- Features: 22 categorical attributes
- Target:
edible(0) orpoisonous(1)
The notebook (Mushroom_done.ipynb) includes training and evaluation of the following models:
| Model | Description |
|---|---|
| Logistic Regression | Baseline model for classification |
| Decision Tree | Tree-based classifier for feature splits |
| Random Forest | Ensemble method of multiple trees |
| K-Nearest Neighbors | Instance-based classifier |
| Naive Bayes | Probabilistic classifier |
| Support Vector Machine | Hyperplane-based binary classifier |
Each model is evaluated using:
- Accuracy
- Precision, Recall, F1-score
- Confusion Matrix
After comparing multiple models, the best-performing model was Random Forest, achieving the highest accuracy and robust performance across all metrics. This model is saved and used in the web app.
A Streamlit-based web app is included for interactive predictions.
- Manual input using dropdowns
- CSV batch prediction
- Visual summary of predictions
- Downloadable result CSV
create python venv
activate venv (source venv/bin/activate)
pip install -r requirements.txt
streamlit run app.py- Parthiban G




