Skip to content

Kpewww/food_safety_ml

 
 

Repository files navigation

🍄 Food Safety AI

Mushroom Classification Project

By Zirui Zeng, Weichen Zhang, Xiangchen Kong, Hansheng Huang, & Lily Hu Mushroom Dataset from Kaggle https://www.kaggle.com/datasets/uciml/mushroom-classification/data

Overview

Welcome to the Mushroom Classification Project! 🌟 This project leverages machine learning to classify mushrooms as poisonous or edible by identifying their characteristics. Our goal is to provide a valuable tool that helps users recognize mushrooms and determine their safety for consumption.

Project Description

This project uses a machine learning model to analyze and classify mushrooms. By training the model on a dataset containing various features of mushrooms, it learns to predict whether a new mushroom instance is edible or poisonous. The key features considered include:

  • 🍄 Cap shape
  • 🍄 Cap surface
  • 🍄 Cap color
  • 🍄 Gill attachment
  • 🍄 Gill spacing
  • 🍄 Gill size
  • 🍄 Gill color
  • 🍄 Stalk shape
  • 🍄 Stalk root
  • 🍄 Stalk surface
  • 🍄 Stalk color
  • 🍄 Veil type
  • 🍄 Veil color
  • 🍄 Ring number
  • 🍄 Ring type
  • 🍄 Spore print color
  • 🍄 Population
  • 🍄 Habitat

How It Works

  1. Data Collection: 📊 The dataset is sourced from a reliable database that includes various features of mushrooms along with their classification (edible or poisonous).
  2. Data Preprocessing: 🧹 The data is cleaned and preprocessed to ensure the model receives high-quality inputs.
  3. Model Training: 🧠 We employ machine learning algorithms to train the model on the dataset, allowing it to learn patterns and relationships between the features and the classification.
  4. Prediction: 🔮 The trained model is used to classify new mushroom instances based on their features, predicting whether they are edible or poisonous.

Features

  • User-Friendly Interface: 🖥️ A simple and intuitive interface for users to input mushroom features and get classification results.
  • Accurate Predictions: 🎯 Leveraging advanced machine learning techniques to ensure high accuracy in predictions.
  • Educational Resource: 📚 Provides insights into the key features that determine the classification of mushrooms.

Getting Started

Prerequisites

To run this project, you will need:

  • 🐍 Python 3.x
  • 📓 Jupyter Notebook
  • 📦 Libraries: Pandas, NumPy, Scikit-learn, Matplotlib, Seaborn

Packages

The following Python packages are required to run the script:

# Install numpy
pip install numpy

# Install pandas
pip install pandas

# Install scikit-learn
pip install scikit-learn

# Install matplotlib
pip install matplotlib

# Install seaborn
pip install seaborn

### How to run the project:

- option1: go to the url:https://foodsafetyml-y2s3hytg2upcjton9ggihs.streamlit.app/
- option2:
- 1) pip install -r requirements.txt
- 2) streamlit run streamlit_app.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 96.6%
  • Python 3.4%