Automated Menu Recommendation System Based on Past Preferences

Data mining plays an important role in ecommerce in today’s world. Time is critical when it comes to shopping as options are unlimited and making a choice can be tedious. This study presents an application of data mining in the form of an Android application that can provide user with automated suggestion based on past preferences. The application helps a person to choose what food they might want to order in a specific restaurant. The application learns user behavior with each order what they order in each kind of meal and what are the products that they select together. After gathering enough information, the application can suggest the user about the most selected dish in the recent past and since the application started to learn. Applications, such as these, can play a major role in helping make a decision based on past preferences, thereby reducing the user involvement in decision making. Keywords—data mining; Apriori; Android; restaurant; recommendation system


I. INTRODUCTION
E-commerce has become an important aspect of our life today.The popularity of mobile devices has further helped towards pushing this trend upwards [1].People are spending more time shopping online on their mobile devices today than they were in the past.At the same time, inventories of online stores are ever increasing giving shoppers more options to choose from.However, with the availability of so many different options, making a decision can be stressful.Data mining can play an important role in providing user with the right information at the right time, thus improving the shopping experience of the user [2].
Data mining is being used in several ecommerce sites such as Amazon and ebay.However, restaurants are still lagging behind in the application of data mining to improve their operations.Relationships and trends in user data can be identified and used to improve user experience by providing them with automated menu recommendations based on their past preferences.This paper describes a study performed by applying data mining techniques and Android application development techniques in creating an application for a restaurant.The application is a digital menu that differentiates the kind of meal based on the time of the day and suggests the user the most common dishes for that kind of meal.The application uses Apriori algorithm [3] to analyze the information that the user enters and provides automated recommendations based on past usage.As such, the application is constantly learning about the user and evolving with each usage.
Android [4] is a mobile operating system based on the Linux kernel.It has been designed for devices with a touchscreen such as smartphones and tablets.Android was developed by Android Inc. that was founded in 2003.It was bought by Google in 2005 [5].Android is the world's most powerful and popular mobile platform with over a million new Android mobile devices activated every day [6].
The Apriori algorithm is a data-mining algorithm for frequent mining of item sets over transactional databases.The algorithm works by analyzing a dataset considering a minimum support threshold.The algorithm then identifies the individual items with a frequency greater or equal than the threshold, and creates datasets by combining all those items.The algorithm does the same with the new datasets, until there is any item in the set that has more frequency than the minimum support threshold.

II. METHODS
The application is programmed in Android, API level 19 (for Android 4.4.2 or higher), using eclipse [7] as the integrated development environment.SQLite3 [8] is used as the backend which is a simple way to save user data.
The MySqlHelper class is used to create and fill the database.The database has three different tables as shown in Figure 1.The "Dishes" table has the following attributes -id as the primary key, name of the dish, the description, the category and the price.The second table is called "Transactions" and contains the id as the primary key, the kind of meal and the date of the transaction.The "Transactions Dishes" table has an id and also holds the primary keys of the first two tables as foreign keys.This table is used to provide data to the Apriori algorithm which provides the data mining capabilities to the application.
Next, there are three classes working as content providers [9], one for each of the three tables in the database.Content providers manage access to a structured set of data.They encapsulate the data, and provide mechanisms for defining data security.They are also the standard interface that connect data in one process with code running in another process.In this case, these classes are used to provide an easy way to communicate and interact with the database such as the ability to insert a row in any of the database tables.www.ijacsa.thesai.orgThere are two activities [10] included with the application.An activity is a screen where the programmer establishes the GUI, in order to interact with the user.Normally, these activities are full screen but they can also appear in other forms such as floating windows, or embedded inside of another application.
The activities consist of spinners [11].A spinner provides a quick way to select a value from a set.In the default state, a spinner shows its currently selected value.Touching the spinners display a dropdown menu with all other available values from which the user can select a new one.
The Apriori algorithm is used to identify the names of the dishes that the user usually purchases together.The minimum threshold for the algorithm is two.The algorithm keeps track of the user selection and after gathering enough information about user behavior, it is able to recommend a dish to the user based on their past preferences.

III. RESULTS
Figure 2 displays a screenshot of a cellphone with the application icon named "DeliChooser" in the last row.Clicking on the icon opens the application.
The application has two activities.Figure 3 displays the first activity of the application in its default state.The first activity consists of three spinners.The first spinner is used to determine the kind of meal such as dinner, breakfast, lunch, etc.This field is set automatically depending on the hour of the day.However, the user is also given the ability to change it for each transaction.The second spinner is used to determine the category of the dish, such as breakfast platters, breakfast wraps, desserts, hot signature sandwiches, etc.The third spinner is used to choose a dish such as chicken parmesan, blondie brownie, ghost rider, etc.The second and third spinners are related because every time the user changes the category using the second spinner the new list of dishes is automatically shown using the third spinner.
The application also has six text views following the three spinners.The first one is a static text view and its only function is to show the string "Selected:" whenever a dish is selected.The second and third text views show the most selected dish in the last month as well as historically depending on the kind of meal selected in the first spinner.The fourth and the fifth text views show characteristics of the dishes, and change every time the third spinner is modified.The fourth text view shows the price of the dish and the fifth text view shows the description of the dish.The sixth text view appears only when the user chooses a dish, and the application has enough information to display about the dishes that the user normally selects with the dish that was chosen.
Figure 4 displays all the six text views after the user has made a selection.The first text view is "Selected:", the second text view is "Historically: Chicken Parmesan", the third text view is "Last Month: Chicken Parmesan", the fourth text view is "$7.99", the fifth text view is the description "Seasoned Italian sausage grilled multi colored bell peppers marinara sauce, mushrooms & onions, served on a hero bread" and the sixth text view is "You usually choose the following dish(es) with this one: -Classic Breakfast Wrap".The sixth text view appears when the user clicks on the button "Select" which also saves the current transaction into the database.www.ijacsa.thesai.orgThe second activity is used to display information about the restaurant as shown in Figure 5.It provides the name and logo, hours, address, and telephone number of the restaurant.IV.DISCUSSION With the ever growing product inventory in e-commerce sites, an average user has to browse through several pages before they decide to buy a product.This can be overwhelming and tedious.Recommendation systems help user by providing them with suitable matches as per their preferences, thereby, saving hours of their search time.
This paper presented one such recommendation system for a restaurant environment.The application keeps track of a user's past preferences in selecting a menu item and after gathering sufficient information, the system is able to suggest the user with menu items that the user might prefer.The application also takes into consideration the time of the day when making a recommendation.This removes the hassle of browsing through the menu to decide what to order thus saving user their valuable time.
The application was developed using Android operating system as it is the most popular operating system and used by majority of the mobile users.A lot of companies have their own Android application which makes it easier for the users to access their information faster than in any other ways, because they have all that they need in their cell phones which can be used on the go.Data mining techniques such as the Apriori algorithm was utilized to develop the recommendation system.The algorithm keeps track of the user behavioral data which is an indication of what items does the user normally purchase together and how frequently is that done by the user.By considering such factors and by learning over time, the algorithm is able to make smart recommendations to the user thus saving the user valuable time of having to browse through the menu every time.www.ijacsa.thesai.orgFuture work will involve adding and displaying nutritional information about the dishes, and also adding information about multiple restaurants.A study will also be performed to further improve the algorithm by adding other factors related to user purchase pattern such as the price of the item and the nutritional value of the item that the user normally purchases.A webpage will also be developed and connected to the application database which will allow the restaurant manager to keep track of the items that the customers normally purchase together.This will enable them to make relevant offers, add new dishes and change prices.Future work will also involve applying the recommendation algorithm to other fields such as a trip recommendation system.
V. CONCLUSION Recommendation systems have become an important part of our digital life.These systems are being used by several ecommerce sites to improve user experience of online shoppers as they can be a valuable resource to the user.This paper presented a menu recommendation system for a restaurant.The application provided user with menu recommendation depending on the users past preferences and the time of the day.The Android operating system was used to develop the application and the Apriori algorithm was used as the basis of the recommendation system.Applications such as this can contribute towards improving the shopping experience of the users by saving them both time and effort.