A Recipe Recommendation System Based on Regional Flavor ...
Post on 01-Oct-2021
1 Views
Preview:
Transcript
2017 2nd International Conference on Communications, Information Management and Network Security (CIMNS 2017)
ISBN: 978-1-60595-498-1
A Recipe Recommendation System Based on Regional Flavor Similarity Lin-rong GUO, Shi-zhong YUAN*, Xue-hui MAO and Yi-ning GU
School of Computer Engineering and Science, Shanghai University, Shanghai 200444, China
*Corresponding author
Keywords: Chinese regional cuisines, Flavor preference, Flavor similarity, Recommendation system.
Abstract. One of the factors that affect food choice is flavor preferences. Although the flavors of
cuisines vary from one region to another, there are flavor similarities among the cuisines from
geographically adjacent regions. This paper presents a recipe recommendation system to recommend
a set of dishes from the various Chinese regional cuisines for a certain flavor preference in terms of
flavor similarity. The flavor similarities among the cuisines are determined using our previously
developed algorithms. First, the TF-IDF (Term Frequency-Inverse Document Frequency) algorithm
is used to calculate the ingredient preferences of the regional cuisines, on the basis of which, each
dish of the regional cuisines is given a score. Then, we use the cosine similarity to measure the flavor
similarities among the regional cuisines. Finally, the Tidal-Trust algorithm is employed to choose the
dishes with the most similar flavors and recommend them to the user. The results of the questionnaire
evaluation for the system show the recommendations from the system are reasonable and acceptable
from professional chefs’ point of view.
Introduction
In recent years, with the rise of "kitchen economics"[1], a variety of recipes recommendation
systems emerge in an endless stream. However, the dietary preferences of users are influenced by
many factors, such as heredity, geographical environment, cultural environment, the current health
needs, dietary balance and some other factors. From the perspective of current health needs, T Ueta,
M Iwakami, T Ito et al. [2] proposed a goal-oriented recipe recommendation system, with which users
without any professional nutrition knowledge can get the appropriate recipes by entering natural
language, such as "I want to relieve fatigue". Ting Y H, Zhao Q, Chen R C et al.[3][4] recommended
a proper recipe based on the recipe ontology according to the user's health conditions and their
preferences. From the angle of dietary balance, Yoko MINO, Ichiro Kobayashi[5] combined recipes
with the user's schedule according to daily activity of the user. Naoki Shino, Ryosuke Yamanishi et
al.[6] put the research point on the menu, they considered that sometimes the ingredients in the recipe
could not be deployed or purchased at that time, and they found that other ingredients could be used to
replace the missing ingredient. Yajima A, Kobayashi I [7] proposed a method to recommend "easy"
cooking recipes by analyzing the content of recipes and considering user's conditions. In addition,
Zemeng Feng, Lifang Wu et al.[8] thought that user’s acceptance of a recipe is consistent with his/her
preference for ingredients in the recipe. Nevertheless, they didn't have much explanation for why
people like or dislike certain ingredients. Actually, here, it involves the influence of all the factors
mentioned above on people's eating habits influence.
As the saying goes, “A side water and soil raises a side people”, the influence of the geographical
environment on people's eating habits is very heavy. However, many of the existing recommendation
systems are not considered from a geographical point of view. Based on this situation, we develop a
recipe recommendation system based on regional flavor similarity. By this system, users can choose
their own love of a regional cuisine (such as Shandong), then find the other regional cuisine (such as
northeast dishes), which has a higher flavor similarity with the selected cuisine.
To implement this system, we need to calculate the flavor similarity between regions. In a previous
paper[9], we have studied the basic idea and algorithm design of flavor similarity computation. Firstly,
we use TF-IDF algorithm to get ingredients of regional preference recipes, and calculate scores of all
421
recipes in this region. Then, we calculate the similarity between regions by cosine similarity
algorithm. Finally, tidal-trust algorithm is used to calculate the scores of other regions recommended
to the region. The higher scoring topN recipes are recommended to users.
The system based on regional flavor similarity is different from [2][3][5][7][8]. [2][3][5][7][8]
consider the user's health status, daily activities, personal preferences respectively. They often require
direct user participation, but in fact, for various reasons, users sometimes fail to provide accurate
measurement indicators, which can often lead to inaccurate results. Therefore, we provide users with
recipes to meet their needs and their regional characteristics of the diet by regional flavor similarity.
Architectural Design and Functionality
Our system has two main functions: (1) Query of high frequency ingredients in recipes. Users can
find ingredients used frequently in a region and understand the region's taste preferences. (2)
Recommendation between regional flavor similar cuisines. Users can obtain recipes from other
regions, which has a higher degree of similarity with the selected region, according to the ranking to
satisfy his/her need.
Architectural Design
Our system is divided into 4 layers, as shown in Figure 1. (1) The first layer is data collection layer.
Since our system is based on Chinese mainland provinces and cities, we collect relevant data from
the Chinese mainland's largest food web site “Meishi Jie”. (2) The second layer is data processing
layer. After collecting the data, we use algorithms mentioned above to calculate regional flavor
similarity. (3) The third layer is data storage layer. We store the data of regional flavor similarity
calculated by algorithms in database. (4) The fourth layer is portal layer. Our system provides two
main functions: high frequency ingredients inquiry of various cuisines; recommendation of similar
cuisines between different regions.
Figure 1. Architectural design.
Structural Components and Functionality
Data Collection. The data of our system comes from “Meishi jie”, which is one of the largest
recipe information platforms in Chinese Mainland. We have obtained 20 Chinese cuisines on
"Meishi Jie" by data crawling, including 8498 recipes and 2911 ingredients.
Data Processing. After data collection, we divide the data into 2 data sets, one is a set of 8498
recipes involving 20 regions, and the other is a set of component containing 2911 ingredients.
a) Ingredient preferences and each recipe’s score of the regional cuisines. In order to calculate
the score of recipes, firstly we calculate the score of various ingredients in different regions by
TF-IDF algorithm[6].
422
, , ,s t s t s tI TF IDF (1)
If “s” is token as Shandong cuisine and “t” is token as potatoes, we can calculate the degree of
Shandong people's preference for potatoes by formula (1). The weight of Shandong people's
preference for partial ingredient is shown in Table 1.
There is a recipe called "potato stewed egg" in Shangdong cuisine, including egg, salt, garlic,
onions, potatoes, black pepper. We added up the scores of these ingredients by formula (2), which
was the final score of this recipe.
,( )s s t
t R
Score R I
(2)
b) Regional flavor similarity calculation. For example, the Shandong people's evaluation of the
2911 ingredients is as follows: , ,1 ,2 ,2911[ , ,..., ]s k s s sI I I I , and the Jiangsu people’s evaluation of the
2911 ingredients is as follows: , ,1 ,2 ,2911[ , ,..., ]j k j j jI I I I . We can calculate the taste similarity
between Shandong and Jiangsu people by cosine similarity algorithm and formula (3), which is the
flavor similarity between Shandong cuisine and Jiangsu cuisine. The flavor similarity between
Shangdong cuisine and other cuisines is shown in Figure 2 below.
2911
, ,
1
2911 29112 2
, ,
1 1
cos ( , )
( ) ( )
s k j k
ks j
s k j k
k k
I I
ine I I
I I
(3) c) Similar cuisine recommended. For instance, we recommend recipes from Shandong cuisine to
Jiangsu cuisine by tidal-trust algorithm and formula (4).
,( ) cos ( , )s j s j sScore R ine I I R (4)
In the same way, we can also recommend recipes from other cuisines to Jiangsu cuisine and sort
all recipes, then choose the higher n recipes. These recipes combine the local characteristics and
satisfy the tastes of the people in Jiangsu.
Figure 2. The flavor similarity between Shangdong cuisine and other cuisines.
Data Storage. After handling related data sets through above algorithms, we design two tables:
423
Table 1. Ingredient preference table.
Table 2. Ingredient Search Data Table.
Table 3. Recipe Similarity Score Data Table.
a) Ingredient search data table(Table 2). This table is used to keep the basic information about
the ingredients. To avoid confusion, "gid" field is requested to be unique in the table. And other
fields are not null values.
b) Recipe similarity score data table (Table 3). This table is used to store the scores, ingredients,
cooking method and other relevant information of recipes in other areas similar to the chosen
recipes. Similarly, "rid" field is requested to be unique in the table. And other fields are not null
values.
Portal. The system has two main functions as follows: high frequency ingredient inquiry of
various cuisines and recommendation of similar cuisines.
a) High frequency composition inquiry of various cuisines
For a particular cuisine, we can use a "high frequency ingredients" to search for a number of
recipes that are frequently used in the cuisine, and also to learn more about the taste preferences of
people in this area.
For example, the high frequency ingredients of Shandong cuisine are tofu, beef, cabbage etc.
Here, we represent it by histogram (Figure 3). Through the histogram, we can see that tofu is used
most frequently in Shandong cuisine, its frequency is 30%.
424
Figure 3. High frequency ingredient.
b) Recommendation of similar cuisines between different regions
Other regional cuisines are eventually recommended to the cuisine we selected after scoring and
screening. For example, if you want to open a restaurant in Shandong, according to the score, you
can choose fresh milk grill, Susan fish, pouch fish, etc. of Shanxi cuisine, Braised tripe with red
beans of Hunan cuisine, lotus set crabs of Hubei cuisine and so on (Figure 4). You can take them as
the introduction of new recipes to attract customers.
Figure 4. Similar recipes recommendation.
Conclusions and Future Work
From the perspective of regional dietary preferences, our system implements recipe
recommendation based on regional flavor similarity. Through this system, users can specify a
cuisine according to their own preferences, and find other cuisines similar to the cuisine they have
specified to satisfy their taste bud requirements. And the restaurant operators can realize "win-win"
between the restaurant management and the customers' needs by our system.
In order to evaluate whether the system is reasonable and acceptable, we have invited
professional chefs to try and grade the system. Finally, the average score of Shandong was 7.98, the
average score of Jiangsu was 7.7 (the highest score was 10 points). This shows that this system is
convenient and practical in daily life, and it has good user experience and high anti loudness. Thus,
it has a certain value in use.
However, there are still some areas for improvement in the system. For example, the algorithms
we studied before did not study the quantity of each ingredient in the recipes. And the function of
the page needs to be optimized. It is better to add search function to the sub pages of each cuisine,
and search for other recipes with higher similarity to a specific ingredient in the cuisine. But
because the data and computation of this index are too complex, function optimization needs further
study.
425
References
[1] Li Z, Hu J, Shen J, et al. A Scalable Recipe Recommendation System for Mobile
Application[C]// International Conference on Information Science and Control Engineering. IEEE,
2016:91-94.
[2] Ueta T, Iwakami M, Ito T. Implementation of a Goal-Oriented Recipe Recommendation System
Providing Nutrition Information[C]// Conference on Technologies and Applications of Artificial
Intelligence. IEEE Computer Society, 2011:183-188.
[3] Ting Y H, Zhao Q, Chen R C. Dietary recommendation based on recipe ontology[C]// IEEE,
International Conference on Awareness Science and Technology. IEEE, 2014:1-6.
[4] Lo Y W, Zhao Q, Ting Y H, et al. Automatic generation and recommendation of recipes based
on outlier analysis[C]// IEEE, International Conference on Awareness Science and Technology.
IEEE, 2015:216-221.
[5] Mino Y, Kobayashi I. Recipe recommendation for a diet considering a user's schedule and the
balance of nourishment[C]// IEEE International Conference on Intelligent Computing and
Intelligent Systems. IEEE, 2009:383-387.
[6] Shino N, Yamanishi R, Fukumoto J. Recommendation System for Alternative-Ingredients
Based on Co-occurrence Relation on Recipe Database and the Ingredient Category[C]// IIAI
International Congress on Advanced Applied Informatics. IEEE, 2016:173-178.
[7] Yajima A, Kobayashi I. "Easy" Cooking Recipe Recommendation Considering User's
Conditions[C]// IEEE/WIC/ACM International Joint Conferences on Web Intelligence and
Intelligent Agent Technologies, 2009. WI-IAT. IEEE, 2009:13-16.
[8] Feng Z, Wu L, Jing Y, et al. A recommendation scheme by user preference to components[C]//
IET International Radar Conference. 2015:4. -4.
[9] Mao X, Yuan S, Xu W, et al. Recipe recommendation considering the flavor of regional
cuisines[C]// International Conference on Progress in Informatics and Computing. IEEE,
2017:32-36.
426
top related