Skip to content

A Python program that classifies vegan foods as fruits, vegetables, or 'other' by using a decision tree.

Notifications You must be signed in to change notification settings

ssmahavadi/vegan-food-classification

Repository files navigation

Vegan Food Classification

This project was completed in May of 2021. The task at hand was to classify vegan foods as one of three mutually exclusive categories—fruit, vegetable, or 'other'—by means of decision trees.

To accomplish this task, I created my own dataset in which I listed 28 vegan foods (10 fruits, 10 vegetables, and 8 'other') and their respective descriptions under my chosen features/columns. For example, one of my features was whether or not the food was spherelike; an orange is indeed spherical, so under this column, I wrote 'yes.' Given the dataset of a sample of vegan foods and their respective features, I created two decision trees: one based on gini, and one based on entropy. Then, I added three "special cases" to my dataset—rhubarb, spelt, and olives—and created new decision trees with them included to see how the accuracy and impurity levels changed. More on these trees, comparisons, and my own decisions within this entire process can be found in my paper: https://bit.ly/veganclassification-paper.

Here is the link to a video demonstrating the program's functions: https://bit.ly/veganclassification-video.

About

A Python program that classifies vegan foods as fruits, vegetables, or 'other' by using a decision tree.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages