A Python code that trains and evaluates models (Logistic Regression, SVM, Neural Network) to classify mushrooms as edible or poisonous based on their attributes. Improve food safety and informed decision-making. Description: This project implements a machine learning solution to classify mushrooms as edible or poisonous based on their physical attributes. The code uses Python with scikit-learn and pandas libraries for data preprocessing, model training, and evaluation. Three models (Logistic Regression, SVM, Neural Network) are trained and compared. The project aims to enhance food safety practices and promote informed decision-making regarding mushroom consumption.
Instructions:
- Ensure you have Python and required libraries installed.
- Clone or download the repository.
- Run the code in "mushroom_classification.py" to train and evaluate models.
- The code reads data from "mushrooms.csv" and outputs accuracy scores for each model.
- The correlation heatmap is plotted to visualize feature relationships.
Data: The dataset "mushrooms.csv" contains labeled samples of mushrooms with attributes and "class" labels (edible or poisonous).
Credits: The dataset used in this project is from the UCI Machine Learning Repository.
Note:
- Exercise caution and seek expert advice before using the model's predictions for mushroom consumption decisions.
- Feel free to experiment with hyperparameter tuning and additional models for further improvement.