the flavory: an ingredient recommendation factory

11
theflavory.me: customizing recipes through ingredient recommendations Brandon Kelly

Upload: brandon-kelly

Post on 08-Jul-2015

127 views

Category:

Data & Analytics


0 download

DESCRIPTION

Description of my web app to recommend ingredients for enhancing recipes.

TRANSCRIPT

Page 1: The Flavory: An ingredient recommendation factory

theflavory.me: customizing recipes through ingredient recommendations

Brandon Kelly

Page 2: The Flavory: An ingredient recommendation factory

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

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

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

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

Brandon Kelly

Page 7: The Flavory: An ingredient recommendation factory

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

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
Page 10: The Flavory: An ingredient recommendation factory
Page 11: The Flavory: An ingredient recommendation factory