Association rules: Find the recipe for a list of ingredients

Assume I have big database of recipes. For each recipe I have a list of ingredients. Now I want to find all association rules in the form of (ingredient₁, ingriedient₂, …) → recipe.

Is the Apriori algorithm suitable for my problem? As far as I am able to understand the Apriori algorithm is intended to find rules like X → Y where X and Y are subsets of the same superset. But in my case, X and Y are subsets of completely disjoint supersets. Is it possible to fit the Apriori algorithm for my problem? Are there other algorithms that suit my problem better? Or am I completely on the wrong track? I would be very grateful for any tips or hints.

Topic association-rules

Category Data Science


It doesn't seem like an association rule problem. It seems that what you suggest could be simply solved using set operations.

First, create mappings between 1 ingredient and all recipes containing it. Then, if you want to find all possible recipes based on a list of ingredients, it would be identical to the union of all of their "recipe sets".

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.