The Flavory: An ingredient recommendation factory
-
Upload
brandon-kelly -
Category
Data & Analytics
-
view
125 -
download
0
description
Transcript of The Flavory: An ingredient recommendation factory
![Page 1: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/1.jpg)
theflavory.me: customizing recipes through ingredient recommendations
Brandon Kelly
![Page 2: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/2.jpg)
Problem: Customizing recipes
Looks good. But I’d like to make this a little more interesting, what can I add?
Numerous recipe recommendation services, but nothing at the ingredient level.
![Page 3: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/3.jpg)
Can we recommend ingredients in a data-driven way?
Trained using ~ 110,000 recipes and 816 unique ingredients within at least 50 recipes (yummly.com API)
PMI(x, y) = log
p(x, y)
p(x)p(y)
Edges: Pointwise Mutual Information
![Page 4: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/4.jpg)
Can we recommend ingredients in a data-driven way?
Trained using ~ 110,000 recipes and 816 unique ingredients within at least 50 recipes (yummly.com API)
PMI(x, y) = log
p(x, y)
p(x)p(y)
Edges: Pointwise Mutual Information
![Page 5: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/5.jpg)
Can we recommend ingredients in a data-driven way?
Trained using ~ 110,000 recipes and 816 unique ingredients within at least 50 recipes (yummly.com API)
PMI(x, y) = log
p(x, y)
p(x)p(y)
Edges: Pointwise Mutual Information
![Page 6: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/6.jpg)
Brandon Kelly
![Page 7: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/7.jpg)
Analysis: Recommending similar ingredients
• Learn a graph using the pointwise mutual information to define similarity:
• Shrink the estimated PMI toward independence (PMI = 0) for stability:
• Choose the shrinkage parameter M through 8-fold cross-validation
PMI(a, b) = log
p(a, b)
p(a)p(b)= log
p(b|a)p(b)
p̂(a, b;M) =Nab +Mp̂(a)p̂(b)
Nall +M, p̂(a) =
Na
Nall
![Page 8: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/8.jpg)
Validation
• Split the recipes into training (75%) and test (25%) set
• Learn the graph using the training set
• Randomly remove 1 ingredient from each recipe in the test set
• Left-out ingredient was in the top 10 recommended ingredients 25% of the time
• Randomly recommended ingredient contained the left out ingredient only 2% of the time.
![Page 9: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/9.jpg)
![Page 10: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/10.jpg)
![Page 11: The Flavory: An ingredient recommendation factory](https://reader036.fdocuments.in/reader036/viewer/2022081401/559cdc961a28aba0408b471f/html5/thumbnails/11.jpg)