Ömer Faruk Boztaş
bbm406f18
Published in
2 min readJan 9, 2019

--

Hey, this we have focused on the equations which we are going to use them to calculate effects of all the ingreidents on recipes. First, we worked on IDF and TF data of ingredients. Thus, we came with the below formula to estimate them.

Array of Ingredients for Specific User

The notation R depicts all recipes which user has rated. K holds the all ingredients for a recipe. Basically, equation loops all recipes and its ingredients. S_r depicts the rate which user gave to the recipe and M_t shows number of all recipes. I_k illustares number of recipe that ingredient is contained.

Of course, the above process only first step. We should calculate the score for all the recipe from the aspect of a user. To calculate result, we came with the below formula.

Score of Recipe

This formula simply iterates all the ingredients that it contains. Then, takes the weight of ingredient and divides it by total ingredient number of the recipe.

At last, we will obtain the score of all recipes.Hope you get this idea.

Thank you !

--

--