Tomorrow is Thanksgiving. Which means millions of Americans are already heading into the kitchen and pouring over stuffing, pie, and casserole recipes for the highly-anticipated feast.
Well, it turns out, there's an algorithm that could make the big meal even tastier by pointing you toward a better recipe, or by offering a practical ingredient substitute if you find yourself missing something at the last-minute.
Lada Adami, a professor at the University of Michigan and Facebook employee, created a mathematical model that tells us which ingredients are often dropped, added, or substituted to improve the taste of a dish or make it healthier. The tool is particularly convenient if you don't have the right ingredient hand.
We first heard about Adami's "ingredient network" from Michaeleen Doucleff of NPR's The Salt.
The algorithm is based on more than 46,000 recipes and nearly 2 million reviews from the popular recipe-sharing website Allrecipies.com.
Essentially, by looking at tens of thousands of recipes and seeing which ingredients often appear together, the model can figure out, as a general rule, what ingredients go well together, and which ones don't. That created one diagram showing ingredients that complement each other. The diagram is split into a savory and sweet group.
User reviews and ratings offer information about how a recipe can be modified to make it better. (ie. doubling the amount of salt, leaving out nutmeg, or adding an extra teaspoon of sugar). That created a different diagram showing common ingredient substitutions (see below).
Ultimately, given two similar recipes, the ingredient networks help to predict which one will be higher rated by users.
In the ingredient substitution network below, the arrow indicates which ingredients can be swapped in for each other.
(Click to enlarge)
More From Business Insider