Understanding user Taste Preferences for Food Recommendation

:- Machine learning has led to many technological innovations in several industries like marketing, eCommerce, etc…The benefits of AI and ML systems are experienced by many people without even knowing it, in search and recommendation systems as in google search and the way Netflix recommends movies. Furthermore, ML models can hypothetically be trained to understand the taste and predict taste preferences accurately under specific conditions. This ML model is to understand the taste and recommend food products based on users’ tastes. The same process by which a machine learns to identify a users' taste in music applies to a user’s taste in food. Based on the previous food orders made by the user we make our Ml model understand his taste preference and recommend the food products accordingly. Our study provides a better insight into how an ML model understands the user’s taste preferences. In this paper, we provide functionalities to keep track of his previous food orders and taste preferences. Also, we recommend food items for individuals considering their taste preferences.


I. INTRODUCTION
Food is primitive for human life. It is also an essential part of human life. In the sophisticated world, people have a huge choice concerning the food they eat. The luxury of an abundance of choice offers not only many advantages, but also decision making of what to eat is always complex to the point of being overwhelming. There is an increasing attention for the food recommender systems in recent days due to their relevance to food recommendations based on considering their taste preferences. Our recommendation studies on the food domain not only recommend food suiting user preferences but also keep track of eating routine. While many food recommender systems focus on recommendations that suggest food items to a group of members. In such scenarios, the preferences of all group members have to take into account. Also, group recommendation functionalities create many challenges for food recommender systems. This paper discusses all such scenarios and research challenges which are blockers to the development of future food recommendation systems. However, the food domain is a complex domain bringing many challenges for recommendation systems. It is often difficult for consumers to make choices from huge varieties of food items.
For a machine learning model to predict accurately a user's preference or taste, for food is likely to appeal to people, the machine learning model would need some quantifiable data related to food items [1]. Since this data would need to be gathered in the physical world, it will be quite difficult, but not impossible.

II. RELATED WORK A. USER PREFERENCE AS PREDICTOR
Methods for predicting user's taste of food items considering user preference using machine learning approaches creates many challenges for food recommender systems since there are some situations where there is a group of members that may sit together for dinner, then preferences of all group members have to be considered appropriately. [2] Besides, the group recommendation scenario, an intelligent approach is proposed to suggest food items to the individual users based on that particular user's rating on the previous orders. Food ordering chatbot has been developed to collect user preferences for a particular food item. The following table shows how the food item is given a certain value for each of the different tastes according to the food items he ordered earlier.

B. Data Collection
To collect data we have developed a simple chatbot that collects the user taste preferences from his previously ordered food items. We have made a data set with 920 food items with a variety of tastes. Therefore, the user has an abundant choice of food items. The scale would quantify the user judgments on his taste preference based on the taste values as mentioned in the above table. The user is asked to log in to the chatbot and order the food through the chatbot we have developed. We have collected data for the same for the past 11 months with 15 such users. This study provides users with a comprehensive human-computer synergy to collect long-term user preferences in terms of recipe taste values. All the food items are gathered and the taste values of every food item are predicted accordingly. Therefore, predicted food items are recommended to the user based on the taste values of that particular food item.

C. Generating a rank from a correlation Value
Newly, some proposals have been made in food recommender systems, such as using labels for different clusters of users. In this model, a rank is generated from a correlation value. After that, the recommender system will estimate the correlation between the user taste preferences and the previously estimated taste value from the food items. If the correlation value is higher than a predefined threshold, the food item is recommended, if not, it gets ignored [2].

D. Nutritional needs of user
In this context, some food recommendation systems have included some personal information of user age, gender, occupation, physical activities, health problem, etc… are collected. Based on this information food items that are the best fit for the user's nutritional needs are recommended. The fundamental steps required to generate the data to be used in recommendation systems are based on : i.
Nutritional information of food profiles.
To make this data fit for recommendation system nutritionist defined appropriate portions for all food according to its kind and characteristics and determines the amount of macro and micronutrients pertaining to each portion. ii. Kind of menu cards to be filled by the food items.
A menu card follows the general scheme of a regular daily meal and it is also created through the assistance of a nutrition specialty expert. This menu card is made of breakfast, lunch, and dinner. Besides, Considering the goal of this scheme is to implement a personalized food recommendation system for users. [4] This scheme is formulated to identify several nutritional-aware user types.
Further, this recommendation model can be extended to include this additional feature as mentioned in the section II subsection D.
Considering above all, each food item has given some value for each of six different tastes, as shown in the TABLE I.

III. OVERVIEW
User Food Recommendation System is nowadays becoming very popular because of abundant choice food items for the customer and this made the users' choice of choosing a food item complex, among such a vast variety of food items. This Food Recommendation System has predicted food items according to user taste preferences using taste values of every food item as shown in the TABLE I. [3] Based on that taste values of sweet, salty, sour, umami, astringency and bitter an item is recognised which is a 6 dimensional vector having value for each taste which sum up to one are created for each taste.
tastes are: From a menu of food items and six taste values of each food item in that menu. Six-dimensional graphs are drawn in such a way that each food item is represented as a node in the six-dimensional space, where each dimension represents each taste. All such graphs are drawn based on the Manhatten cutoff calculated from the mean and average of taste values of all food items. Every food item is located in a six-dimensional space. All food items are apart from a certain distance between them. Manhatten distance between each node i and i+1 is to be calculated, to find the best path between them. This Manhatten distance is useful to recommend the best relevant food items according to user taste. All the Manhatten distances are calculated and noted separately. In the Fig. III , as mentioned if the manhatten distance (Md) is less than that of the manhatten cutoff(Mx) then only the two nodes are connected, if not ignored. [5] This way all the food items that are of same category are connected.
IV. ARCHITECTURE User taste prediction and recommending food items based on his/ her taste preference is the motto of this model. From the users' previous ordered food items datasets are collected from different users. These datasets are gathered with the help of chatbot we developed for food ordering. In section III, as mentioned first six-dimensional graph, with six tastes on each dimension, is drawn placing all the food items in that six vector space. Secondly, connecting the food items based on the condition, if and only if Manhatten distance( Md ) is less than or equals to Manhatten cutoff( Mx ). After completion of connecting all the nodes (i.e, food items) in the graph, then the model is run into the AI algorithms to make the model intelligent enough to recommend food items to the user.

A. Datasets
As mentioned earlier, users' previously ordered food items are gathered from the chatbot, which is developed for food ordering. These datasets of different users are further processed to understand the users' tastes. [6] Taste values of all previously ordered food items are taken and the mean of individual tastes sweet, sour, umami, astringency, salty and bitter have been calculated. To create data point to run A* algorithm, which is helpful to find a relation between taste values of food items and the users' taste preference among all the six different tastes. This data point is like a base point to run the food recommendation model. Above all, users' taste preference is more important to consider, hence, the dataset plays a vital role in the recommendation system.

B. A* Algorithm
A* algorithm is one of the best searching algorithm for the shortest path in Artifical Intelligence with wide range of applications.
[7] A* is an advanced BFS and optimal algorithm for path finding and graph traversals. g1( x ) represents lowest cost in the neighboring node h1( x ) actual cost of the path from initial node to any node x h( x ) represents heuristic estimated cost from node n to target node Each time A* enters a node, it estimates the cost, f(n) ( n being the neighboring node ), to travel to all the adjacent nodes, and then enters the node with the lowest value of f(n).
One major shortcoming is its space complexity is O(b d ) as it stores all generated nodes in memory. Hence, to overcome this drawback we have implemented customised A* Algorithm, which subdue this weakness and fabricate this model more effiecient and intelligent in recommending food items.

C. BFS Algorithm
Breadth First Search Algorithm is a breadthward motion graph traversal algorithm and it traverse from some arbitrary node to the neighboring node using queue to remember to get to next nodes.

C. Created graph algorithm
This algorithm creates a graph for given manhattan distance and nodes in the form of adjacency list a created graph plotted on 2d space can be seen in result CreateGraph(manhattan cutoff, nodes) Algorithm createGraph(manhattan_cutoff,nodes) no_of_nodes <-number of nodes counter <-1 counter1 <-counter+1 while counter < no_of_nodes while counter2 < no_of_nodes calculate manhattan distance between current node indexed by counter and next node indexed by counter1 if(manhattan distance < manhattan_cutoff) connect nodes and vice versa nodes return graph_created

D. Predict and Recommend user algorithm
This algorithm is the heart and brain of whole project which takes menu items and user orders as input and provide the resultant items as output which are used to recommend the user E. Predict and Recommend user algorithm PredictAndRecommendUser(ItemsMenu, userOrders) Algorithm PredictAndRecommandUser (ItemsMenu,userOrders) nodes are each item in the itemsMenu Ak <-list (sum all manhattan distances between nodes) manhattan_cutoff <-min( Mean(Ak) , Average(Ak) ) //calling createGraph algorithm graph <-createGraph(manhattan_cutoff,nodes) The Food Recommendation System, that is proposed in this paper, has become more intelligent and advanced with the benefits of customized A* and customized BFS algorithms. This model can able to understand and predict users' taste preference . The result is more appropriate and well-defined, as shown in the fig below. Food recommendation model, is successfully integrated in a chatbot named "FOODIE", which is used to order food. As user orders food, chatbot stores the data and run the machine learning model with that data for his next food order through that chatbot and recommends food items from the result of that recommendation model.

Fig. V Predicted food items
This project uses AI algorithms and shows a way that AI can be implemented to give better and similar results apart from using neural networks and other models [9] International This food recommendation system, is built intelligently by considering all the factors into account and is helpful for the users to come over the chaos of huge choice of food items. Most importantly, the problem of considering nutritional needs can also be solved with this model. This makes the sense of advanced and intelligent food recommendation system. However, it should be agreed that the dataset considered is small and food items considered is hundred, yet the model gives the more accurate predictions because of the advantage of customised A* algorithm and customized BFS algorithm. Accurate predictions, here, in the sense the food recommendation model that is designed has been implemented in the chatbot and can provide intended food recommendations to the user. The users have rated the recommendation model, if satisfied, with thumps up and if not satisfied, with thumps down symbol. The pie chart is shown below for the users' ratings.