Inspiration

Anyone who regularly cooks their food has come up with the question of: what should I make this week?

What it does

Our app solves this problem, by recommending recipes based on the user's background.

How We built it

Our initial plan was to use the Azure machine learning platform, as it offers a convenient way to make the machine learning experiments. We used its matchbox recommender system (that is a hybrid recommender system which uses both collaborative-based filtering and content-based filtering) and trained it using our dataset scraped from allrecipes.com, and then deployed it as a web service.

Glossary:

Collaborative-based filtering - Based on other user's data on the list of recipes, Azure creates a sparse matrix and uses matrix operations in order to determine a rough recommendation set for the current user

Content-based Filtering - Based on the user's metadata (e.g. if she was a university student or really liked Chinese food), this user's "content" will affect the recommendation. This is really good if the user has never rated any other recipe in the dataset beforehand, so we can prevent the "cold-start" problem.

Challenges We ran into

On the backend, there is a documented bug on the Azure machine learning platform where any experiment with the matchbox recommender system module cannot be deployed as a web service (and this bug was LITERALLY documented two days ago...). We then switched to Django to store all of our data and calculated the cosine distances between each vector (vector in this case, is each recipe) to implement the machine learning aspect of it. In the end, the two backend developers did not have any experience with making an API however, so ultimately, as time ran out, we finally decided that our iOS client app needed to host the data locally on the iOS just for the purposes of demonstration. Because our complete dataset is over 50,000 recipes, we gave the iOS a subset of our dataset as 50,000 recipes takes a long time to load especially on a mobile device.

On the frontend, in the beginning, workflow was blocked because only one person could work on a storyboard at a time, even though there were two people. Afterwards, using the core data (iOS's local database) was a bit of a challenge as the iOS developers did not have any experience with it. They also never made a RESTAPI client, but fortunately we finally solved all of these issues. However, time was running out, so not all of the features were able to be finished. The UI isn't up to par as we wanted it to be, and some unfinished features include: the master/detail view of the recipes and each of their details, the shopping list that collected all of the user's recipes' ingredients they wanted to cook for the week and listed them in a checkbox format, etc.

LINKS:

Link to the documented bug in the matchbox recommender module: https://social.msdn.microsoft.com/Forums/en-US/288e6914-084b-479a-9c95-f2ccae58ca14/score-model-error-0082-on-predictive-experiment?forum=MachineLearning

Accomplishments that We're Proud of, and What We've Learned

The frontend developers had extremely clean and modular code for a hackathon. They spent a lot of time not getting messy, and doing many mockups and design before actually coding the project. They also learnt a lot (which was listed in the "challenges we've faced" section).

The backend developers learned a lot about machine learning and recommender systems as well. We learned some algorithms on how to implement recommender systems (e.g. hybrid collaborative-based and content-based filtering, but also cosine distance functions). We also learned a very important thing that all good data scientists do: which was to CORRECTLY format the dataset and its subsequent features/columns so that it can be inputted into the machine learning experiment correctly. This included categorizing many features (5000+ potentially) down to 10 features, which makes the machine learning part go faster. This also included cleaning the dataset, and knowing how to clean the dataset in this particular context.

What's next for SmartChef

We want to improve the UI, finish the backend API, and finish more of the features for the iOS client app. We mostly wanted to make this app to learn more about machine learning and how to implement the client-server system, and we are really proud of how much we learned even though no one knew how to do all of this beforehand! :)

Share this project:
×

Updates