Skip to content

A machine learning classification project for predicting food types (pizza, shawarma, sushi) based on human survey responses.

License

Notifications You must be signed in to change notification settings

lcai62/ml-food-classification

Repository files navigation

ML Food Survey Classification

This project explores survey responses related to three food items — Pizza, Shawarma, and Sushi to build a custom multi-class classification model.

Built With

Python
NumPy
Pandas
Matplotlib


Dataset

Survey questions included in questions.md

  • Complexity rating (1 to 5)
  • Expected number of ingredients (free-form text)
  • Expected settings for serving (multi-select)
  • Expected price (free-form text)
  • Movie association (free-form text)
  • Drink pairing (free-form text)
  • People association (multi-select)
  • Hot sauce preference (multi-select)

Exact survey questions are available # todo


Final Model Highlights

  • Accuracy: ~88.4%
  • Trained using 100 independent runs
  • One-hot and BOW encoding
  • Softmax activation
  • L2 Regularization: 0.005
  • Learning Rate: 0.005
  • 2000 iterations

Model Features

  • Q1: Complexity (numeric)
  • Q2: Parsed ingredient count (numeric)
  • Q3: One-hot encoding of selected settings
  • Q4: Parsed price (numeric)
  • Q5: Bag-of-words representation of associated movies
  • Q6: Drink category (manually curated → one-hot encoding)
  • Q7: One-hot encoding of associated people
  • Q8: Hot sauce preference (mapped from text to scale 0–4)

Evaluation & Results

Accuracy Results (100 Runs)

  • Training: 91.2%
  • Validation: 88.9%
  • Test: 88.4%

Figures

  • Accuracy stripplot: test_accuracy_stripplot.png
  • Heatmaps and bar charts for various features (drinks, people, movies)

Getting Started

  1. Clone the repo:
git clone https://github.com/lcai62/ml-food-classification/
cd ml-food-classification
  1. Install requirements
pip install -r requirements.txt
  1. Train model
python3 generate.py
  1. Make predictions
python3 pred.py

About

A machine learning classification project for predicting food types (pizza, shawarma, sushi) based on human survey responses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages