Automated Menu Recommendation System Based On Past Preferences

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

(IJACSA) International Journal of Advanced Computer Science and Applications,

Vol. 5, No. 7, 2014

Automated Menu Recommendation System Based on


Past Preferences
Daniel Simon Sanz1, Ankur Agrawal1
1
Department of Computer Science, Manhattan College, Riverdale, NY 10471

Abstract—Data mining plays an important role in ecommerce usage. As such, the application is constantly learning about the
in today’s world. Time is critical when it comes to shopping as user and evolving with each usage.
options are unlimited and making a choice can be tedious. This
study presents an application of data mining in the form of an Android [4] is a mobile operating system based on the
Android application that can provide user with automated Linux kernel. It has been designed for devices with a
suggestion based on past preferences. The application helps a touchscreen such as smartphones and tablets. Android was
person to choose what food they might want to order in a specific developed by Android Inc. that was founded in 2003. It was
restaurant. The application learns user behavior with each order bought by Google in 2005 [5]. Android is the world’s most
- what they order in each kind of meal and what are the products powerful and popular mobile platform with over a million new
that they select together. After gathering enough information, the Android mobile devices activated every day [6].
application can suggest the user about the most selected dish in
the recent past and since the application started to learn. The Apriori algorithm is a data-mining algorithm for
Applications, such as these, can play a major role in helping frequent mining of item sets over transactional databases. The
make a decision based on past preferences, thereby reducing the algorithm works by analyzing a dataset considering a minimum
user involvement in decision making. support threshold. The algorithm then identifies the individual
items with a frequency greater or equal than the threshold, and
Keywords—data mining; Apriori; Android; restaurant; creates datasets by combining all those items. The algorithm
recommendation system does the same with the new datasets, until there is any item in
the set that has more frequency than the minimum support
I. INTRODUCTION threshold.
E-commerce has become an important aspect of our life
today. The popularity of mobile devices has further helped II. METHODS
towards pushing this trend upwards [1]. People are spending The application is programmed in Android, API level 19
more time shopping online on their mobile devices today than (for Android 4.4.2 or higher), using eclipse [7] as the integrated
they were in the past. At the same time, inventories of online development environment. SQLite3 [8] is used as the backend
stores are ever increasing giving shoppers more options to which is a simple way to save user data.
choose from. However, with the availability of so many
different options, making a decision can be stressful. Data The MySqlHelper class is used to create and fill the
mining can play an important role in providing user with the database. The database has three different tables as shown in
right information at the right time, thus improving the shopping Figure 1. The “Dishes” table has the following attributes - id as
experience of the user [2]. the primary key, name of the dish, the description, the category
and the price. The second table is called “Transactions” and
Data mining is being used in several ecommerce sites such contains the id as the primary key, the kind of meal and the
as Amazon and ebay. However, restaurants are still lagging date of the transaction. The “Transactions Dishes” table has an
behind in the application of data mining to improve their id and also holds the primary keys of the first two tables as
operations. Relationships and trends in user data can be foreign keys. This table is used to provide data to the Apriori
identified and used to improve user experience by providing algorithm which provides the data mining capabilities to the
them with automated menu recommendations based on their application.
past preferences.
Next, there are three classes working as content providers
This paper describes a study performed by applying data [9], one for each of the three tables in the database. Content
mining techniques and Android application development providers manage access to a structured set of data. They
techniques in creating an application for a restaurant. The encapsulate the data, and provide mechanisms for defining data
application is a digital menu that differentiates the kind of meal security. They are also the standard interface that connect data
based on the time of the day and suggests the user the most in one process with code running in another process. In this
common dishes for that kind of meal. The application uses case, these classes are used to provide an easy way to
Apriori algorithm [3] to analyze the information that the user communicate and interact with the database such as the ability
enters and provides automated recommendations based on past to insert a row in any of the database tables.

74 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 5, No. 7, 2014

Fig. 1. Database structure

There 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 Fig. 2. Screenshot showing the application icon
application.
The second and third spinners are related because every
The activities consist of spinners [11]. A spinner provides a time the user changes the category using the second spinner the
quick way to select a value from a set. In the default state, a new list of dishes is automatically shown using the third
spinner shows its currently selected value. Touching the spinner.
spinners display a dropdown menu with all other available
values from which the user can select a new one. The application also has six text views following the three
spinners. The first one is a static text view and its only function
The Apriori algorithm is used to identify the names of the is to show the string “Selected:” whenever a dish is selected.
dishes that the user usually purchases together. The minimum The second and third text views show the most selected dish in
threshold for the algorithm is two. The algorithm keeps track of the last month as well as historically depending on the kind of
the user selection and after gathering enough information about meal selected in the first spinner. The fourth and the fifth text
user behavior, it is able to recommend a dish to the user based views show characteristics of the dishes, and change every
on their past preferences. time the third spinner is modified. The fourth text view shows
the price of the dish and the fifth text view shows the
III. RESULTS description of the dish. The sixth text view appears only when
Figure 2 displays a screenshot of a cellphone with the the user chooses a dish, and the application has enough
application icon named “DeliChooser” in the last row. Clicking information to display about the dishes that the user normally
on the icon opens the application. selects with the dish that was chosen.
The application has two activities. Figure 3 displays the Figure 4 displays all the six text views after the user has
first activity of the application in its default state. The first made a selection. The first text view is “Selected:”, the second
activity consists of three spinners. The first spinner is used to text view is “Historically: Chicken Parmesan”, the third text
determine the kind of meal such as dinner, breakfast, lunch, view is “Last Month: Chicken Parmesan”, the fourth text view
etc. This field is set automatically depending on the hour of the is “$7.99”, the fifth text view is the description “Seasoned
day. However, the user is also given the ability to change it for Italian sausage grilled multi colored bell peppers marinara
each transaction. The second spinner is used to determine the sauce, mushrooms & onions, served on a hero bread” and the
category of the dish, such as breakfast platters, breakfast wraps, sixth text view is “You usually choose the following dish(es)
desserts, hot signature sandwiches, etc. The third spinner is with this one: - Classic Breakfast Wrap”. The sixth text view
used to choose a dish such as chicken parmesan, blondie appears when the user clicks on the button “Select” which also
brownie, ghost rider, etc. saves the current transaction into the database.

75 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 5, No. 7, 2014

Fig. 5. Activity 2 (Default)


Fig. 3. Activity 1 (Default)
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
Fig. 4. Activity 1 (Transaction Added) together and how frequently is that done by the user. By
considering such factors and by learning over time, the
The second activity is used to display information about the algorithm is able to make smart recommendations to the user
restaurant as shown in Figure 5. It provides the name and logo, thus saving the user valuable time of having to browse through
hours, address, and telephone number of the restaurant. the menu every time.

76 | P a g e
www.ijacsa.thesai.org
(IJACSA) International Journal of Advanced Computer Science and Applications,
Vol. 5, No. 7, 2014

Future work will involve adding and displaying nutritional contribute towards improving the shopping experience of the
information about the dishes, and also adding information users by saving them both time and effort.
about multiple restaurants. A study will also be performed to REFERENCES
further improve the algorithm by adding other factors related to
[1] L. Einav, J. Levin, I. Popov and N. Sundaresan, Growth, adoption and
user purchase pattern such as the price of the item and the use of mobile e-commerce, The American economic review, 104(5), pp.
nutritional value of the item that the user normally purchases. 489-94, 2014.
A webpage will also be developed and connected to the [2] Data mining in ecommerce, [retrived July 2014]
application database which will allow the restaurant manager http://www.ias.ac.in/sadhana/Pdf2005AprJun/Pe1299.pdf
to keep track of the items that the customers normally purchase [3] R. Agrawal and R. Srikant, Fast algorithm for mining association rules,
together. This will enable them to make relevant offers, add In Proc. 20th int. conf. very large databases, VLDB (Vol. 1215), pp. 487-
new dishes and change prices. Future work will also involve 499, September 1994.
applying the recommendation algorithm to other fields such as [4] Android, [retrived July 2014] http://www.Android.com/
a trip recommendation system. [5] Android Wikipedia Page, [retrived July 2014]
http://en.wikipedia.org/wiki/Android_(operating_system)
V. CONCLUSION [6] About Android, [retrived July 2014]
http://developer.android.com/about/index.html
Recommendation systems have become an important part
[7] Eclipse, I.D.E., The Eclipse Foundation, 2007, [retrived July 2014]
of our digital life. These systems are being used by several e- https://www.eclipse.org/
commerce sites to improve user experience of online shoppers [8] SQLite, [retrived July 2014] https://www.sqlite.org/
as they can be a valuable resource to the user. This paper [9] Android Content Provider, [retrived July 2014]
presented a menu recommendation system for a restaurant. The https://developer.Android.com/guide/topics/providers/content-
application provided user with menu recommendation providers.html
depending on the users past preferences and the time of the [10] Android Activity, [retrived July 2014]
day. The Android operating system was used to develop the https://developer.Android.com/reference/Android/app/Activity.html
application and the Apriori algorithm was used as the basis of [11] Android Spinner, [retrived July 2014]
the recommendation system. Applications such as this can https://developer.Android.com/guide/topics/ui/controls/spinner.html

77 | P a g e
www.ijacsa.thesai.org

You might also like