Case-Based Knowledge-Based Recommendation Engine Example

Explanation:

The key to a case-based knowledge-based recommendation engine is that it uses a "case" or an example to work off. For example, you might have a recipe in mind that you like, but you want one just like it but with fewer calories or with the inclusion or exclusion of a certain ingredient.

Compared to constraint based and filter based, case based actually uses "intelligence" in order to detemine similar recipes.

Now, how do we compare recipes so that we can find similar recipes to the case? First, what is a recipe? Or, more precisely, what are the "parts" or "components" that make a recipe a recipe?

We suggest that a recipe is mostly about the ingredients. After that there are many different things, from the way it is cooked or baked, to calories, how highly rated it is, etc.

Specifically, for this example we will focus on the following:

  • Ingredients (recipes are little more than the ingredients) - We use Jaccard Similarity to compare ingredients. A common alternative would be to use Cosine Similarity.
  • The calories per serving (most people care about this) - We use basic Euclidean distance to compare calories.
  • Not showing a recipe twice (if it was rejected the first time then there is not point bringing it back)

Case-based knowledge-based recommendation engines are very customized per industry. For example, what are the most important parts of a recipe (e.g. ingredients) is meaningless in a vacation recommendation engine.

In this example, the user picks a random recipe* then the most similar recipe to it is processed. The user can then try to fine tune the results by adding/taking away an ingredient or perhaps find one more or less calories per serving.

*In the real world, the user would have a specific recipe in mind that they would want as a starting point (called the "case"). For example, the user might like a particular tomato soup recipe, but wants to find a recipe like it but with added cheese. Or, the user might like the recipe with the given ingredients but wants to find one like it but with fewer calories.

NOTE 1: If the same recipe is recommended then it is not the fault of the recommendation engine, it is the fault of the data. There are some recipes entered into the database multiple times.

NOTE 2: The "Leaner Recipe" button is disabled if you are requesting less than or equal to 100 calories per serving.

DISCLAIMER: This is an example recommendation engine for the purposes of learning and teaching. There are many other features that could be added.

Case-Based Knowledge-Based Recommendation Engine Example
with NaN Database Entries
Step 1 (two choices): Choose from a drop-down list or choose five random recipes. This recipe will be the initial "case" to which the recommendation engine will find similiar recipes. Pick a random recipe or click "Show 5 new random recipes" for more to choose from.

Or, choose a random recipe.


Show 5 new random recipes
Start over with 5 new random recipes
Remove all requirements (start over again with same case recipe)

0 results (no queries submitted yet)
Determine Similar Recipes with:
Processing. Please Wait...

Step 2: Choose one of the following actions to narrow your results:


Add Ingredient
Exclude Ingredient
Heartier Recipe
Leaner Recipe