Recipe Recommender System
Driven by my curiousity of how Netflix, Youtube and Spotify serve personalized recommendations, I decided to learn how to create my own recommender system.
Machine Learning Problem: Given a person’s preferences in past recipes, could I predict other new recipes they might enjoy?
I created Seasonings, a Recipe Recommender System. The motivation behind this web app is to help users discover personalized and new recipes, and prepare for grocery runs! I received a lot early positive feedback and plan future improvements to the UX and model.
I had a lot of fun making this, and plan to use this whenever I need a jolt of inspiration in the kitchen!
Data was scraped from allrecipes.com, as there was no public API. I narrowed the scope to focus on Chef John’s recipes (from FoodWishes.com).
Content Data
all_recipes.csv
1100+ Recipes from
460+ Cuisines & Categories
Content Data
all_users.csv
web_scraper.py
for more detailsrequirements.txt
for moreapp.py
on localhost:5000 ```Please refer to model.py
If I liked Spaghetti Al Tonno, and another user similar to me liked Perfect Prime Rib and I haven’t tried it, the model would recommend that recipe.
If I liked Spaghetti Al Tonno, the model would recommend Italian Meatballs, because Italian Meatballs are similar to Spaghetti, in terms of the categories both recipes share (Italian, World Cuisine).
If I liked Turkey, and I liked Cranberry Sauce, the model would recommend Pumpkin Pie because it picked up a latent factor that you liked Thanksgiving dishes, where the other models would not be able to.
My final model was a hybrid recommender that tackled the cold-start problem with a content recommender, augmented with user preferences, and factorization to rank recipes based on a voting classifier rule.
Special thanks to Kim Falk’s book and also Maciej’s GitHub for reference during this journey.