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

INDORE

RESTAURANT RATING AND RECOMMENDATION SYSTEM

A Project Report Submitted at


Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal
In partial fulfillment of the degree
Of

Bachelor of Engineering
In

Computer Science & Engineering

Submitted To:
Mr. Vivek Gupta

Department of Computer Science & Engineering


Medi-Caps Institute of Technology and Management
Indore-453331

2018-2019
INDORE

RESTAURANT RATING AND RECOMMENDATION SYSTEM

A Project Report Submitted at


Rajiv Gandhi Proudyogiki Vishwavidyalaya, Bhopal
In partial fulfillment of the degree
Of

Bachelor of Engineering
In

Computer Science & Engineering

Submitted by:
Amrendra Singh Bagga (0812CS151011)
Atharva Urdhwareshe (0812CS151026)
Deepraj Mandliya (0812CS151039)
Submitted To:
Mr. Vivek Gupta

Department of Computer Science & Engineering


Medi-Caps Institute of Technology and Management
Indore-453331

2018-2019
Medi-Caps Institute of
Technology & Management
INDORE

A. B. Road, Pigdambar, Rau, Indore – 453331

CERTIFICATE

This is to certify that Deepraj Mandliya (39), Atharva Urdhwareshe (26), Amrendra Singh
Bagga (11) have completed their Major Project work titled “RESTAURANT RATING
AND RECOMMENDATION SYSTEM” as per the syllabus and have submitted a
satisfactory report on this project as a part of fulfillment towards the degree of Bachelor of
Engineering in Computer Science & Engineering from Rajiv Gandhi Proudyogiki
Vishwavidyalaya, Bhopal.

Signature: _______________
Name: Ms Swati Tahiliani Signature: _______________
(Project Guide) Name:
(External Examiner)

Signature: _______________
Name: Mr Vivek Gupta
(Internal Examiner)

III
ACKNOWLEDGEMENT

The most awaited moment of successful completion of an Endeavour is always a result of


persons involved implicitly or explicitly in it. The successful completion of all the phases of
our project is the result of dedicated efforts put in by many people and this report would be
incomplete without giving due credits to them. This acknowledgment is but a small token of
gratitude in recognition of their help in our endeavor.

We express a deep sense of gratitude to our project coordinator Mr. Vivek Gupta for her
invaluable support and constant encouragement which was of great support to bring this work
to present shape.

We would like to give our sincere thanks to Dr. Suresh Jain, HOD of Computer Science
and Engineering Department from whom we have learnt a lot.

We are deeply indebted to Dr. Sunil k. Somani, Director who provided us a well-equipped
computer laboratory with all required software and library, which was an essential
requirement for the success of this project.

Last but not the least; we would like to thanks our colleagues, friends and our parents who
were a constant and willing source of encouragement and inspiration for us throughout the
project.

Name of Student’s
Deepraj Mandliya
Atharva Urdhwareshe
Amrendra Singh Bagga

IV
INDEX

1. Introduction 1-2
1.1 Objective 1
1.2 Scope 1
1.3 Problems Domain 2
1.4 Solution Domain 2
1.5 Platform Specification 2
1.5.1 Hardware
1.5.2 Software

2. System Requirement Analysis 3-5


2.1 Information Gathering 3
2.1.1 Functional Requirement
2.1.1 Non Functional Requirement
2.2 System Feasibility 4-5
2.2.1 Technical
2.2.2 Economical

3. System Design 6-10


3.1 Use Case Diagram 6
3.2 Activity Diagram 7-8
3.3.1 Sequence Diagram 8-9
3.3.2 Sequence Diagram 10

4. Database Design 11
4.1 Data Design
4.1.1 ER Diagram 11
5. Implementation 12-14
5.1 Implementation of modules 12-14
5.2 Results 14

6. Testing 15-18
6.1 Testing Methods used 15
6.2 Test Cases 16-18
7. Conclusion & References 19-20

V
List of Figures

Figure No Figure Name Page No.

1.1 Use Case Diagram 5

1.2 Activity Diagram 6

1.3.1 Sequence Diagram - 1 7

1.3.2 Sequence Diagram - 2 9

1.4 ER Diagram 10

VI
ABSTRACT

Review websites, such as Trip Advisor and Yelp, allow users to post online reviews for
various businesses, products and services, and have been recently shown to have a significant
influence on consumer shopping behavior. An online review typically consists of free-form
text and a star rating out of 5. The problem of predicting a user’s star rating for a product,
given the user’s text review for that product, is called Review Rating Prediction and has
lately become a popular, albeit hard, problem in machine learning.
In this project, we explore how to use review text for recommending restaurants to users. We
have investigated features of Yelp data to build machine learning models for rating prediction
and recommendation tasks. User’s restaurant preferences can be decoded based on the users
past restaurant reviews. We create a ranking SVM model with features encompassing user’s
food preferences and dietary restrictions, such as cuisine type, services ordered, ambience,
noise level, average rating, etc. These extracted features are trained using machine learning
techniques such as Linear Regression and Gradient Boosting Regression for rating prediction
and then Clustering is performed for finding similar users and thus recommending
restaurants. Recommendation systems provide personalized, relevant recommendations to
users.

VII
1. INTRODUCTION

1. Objective

Yelp is a local business directory service and review site with social networking features. It
allows users to give ratings and review businesses. The review is usually short text consisting
of few lines with about hundred words. Often, a review describes various dimensions about a
business and the experience of user with respect to those dimensions. This dataset is a subset
of Yelp's businesses, reviews, and user data. It was originally put together for the Yelp
Dataset Challenge which is a chance for students to conduct research or analysis on Yelp's
data and share their discoveries.

This dataset obtained can be used for reviewing feedback and rating restaurants based on
these reviews. These rating will help user to get best possible restaurants in their vicinity.
Further this rating will support recommendation system. Based on individual choices and
regular viewed restaurant, further recommendation can be made thus providing more number
of choices to user.

1.2 Goal and Scope

Main goal of this project is to recommend a restaurant to a user based on the preferences he
chose to have. The recommendation system is made by using the previous data provided to us
by the Yelp dataset. We analyze the ratings (which are usually given from a scale of 1 to 5) to
make a correct prediction for the user based on his preferences.

Scope of this project based on data analysis. This form of analysis is just one of the many
steps that must be completed when conducting a research experiment. Data from various
sources is gathered, reviewed, and then analyzed to form some sort of finding or conclusion.
There are a variety of specific data analysis method, some of which include data mining, text
analytics, business intelligence, and data visualizations. Our project includes data mining
along with predictive analysis.

1
1.3 Problem Statement

According to survey, users find it very difficult to find relevant restaurant in their vicinity.
Yelp is a great source of positive and negative feedback from customers. However, there are
some issues:

1. It is time consuming to read all reviews. Even if a restaurant user decided to read all
reviews.
2. That still would not allow him/her to compare feedback against other restaurants in
the area.

1.4 Solution Overview

The proposed solution can help in the following ways.


1. It gives information about the factors that are responsible for the success of a restaurant. In
this way it gives the user most appropriate option to visit the best restaurant nearby.

2. The analytics also help the user to get recommendation based on their choices based on the
users past experience.

1.5 Platform Requirement

1.5.1 Hardware Specification

➢ 8 GB RAM

➢ Core i3 processor

➢ 128 GB HardDrive

1.5.2Software Specification

➢ MySQL 5.7.0

➢ Python 3.7.0
2
2 System Requirement Analyses

2.1 Information Gathering

We decided that for our system, we would design a web app for restaurant staff members and
the restaurant customers. In order for our solution to meet the needs of both restaurant owners
and consumers, we have constructed a list of requirements that both components of our
system must meet. First are the functional requirements, which define what the system must
do. Next are the non-functional requirements, which define the manner in which the
functional requirements must be met.

2.1.1 Functional Requirements

A web application user must be able to:

• Create user account - The user must be able to successfully create an account on his own
from the registration page.
• Log in/out of their account - After the user has created the account, he/she must be able to
login into the account where they can surf different things.
• Provide customizable options for recommendation - After logging in the user must put his
preferences and according to these preferences he/she would get a recommended set of
restaurants. These preferences are user-specific and are very important for every user to
carefully put all the preferences which they want.

• Recommend user based on selected preferences and previous search - Next time the user
logs into this account, he/she would also get recommendation based on his previous search
along with the current search.

• User can provide feedback based on their experience of restaurant - User must be able to
provide a feedback to the restaurants about the preferences he made and the recommended
restaurant he/she got based on these preferences.

3
2.1.2 Non-Functional Requirement

Usability:

➢ User can easily choose the restaurant on the rating and reviews before go there.

➢ Restaurant owner can easily get feedback of their services and user can easily give
feedback without hesitation.
Reliability:

➢ System will ask for relevant information if not provided.

➢ If vague or out of scope information is fed into system then it will discard such input.

Performance:

➢ For better performance; system will perform analytics on 1.32 GB dataset which is
sufficient to predict and determine various factors.

2.2 System Feasibility:

2.2.1 Technical

Technical feasibility study is the logistical or tactical plan of how your system will produce,
store, deliver, and track its products or services. A technical feasibility study is an excellent
tool for troubleshooting and long-term planning. In some regards, it serves as a flow chart of
how your products and services evolve and move through your business to physically reach
your market.

In this system we make use of standard machine learning algorithms on a given set of data to
predict the best possible restaurant for the user based on the choices or preferences the user
has made.

4
2.2.2 Economical
Economic feasibility analysis is the most commonly used method for determining the
efficiency of a new project. It is also known as cost analysis. It helps in identifying profit
against investment expected from a project. Cost and time are the most essential factors
involved in this field of study.
In this project we have to buy domain for our website. This will cost around Rs3000 for 5
years.

2.2.3 Operational

Operational feasibility is the measure of how well a proposed system solves the problems,
and takes advantage of the opportunities identified during scope definition and how it
satisfies the requirements identified in the requirements analysis phase of system
development. The operational feasibility assessment focuses on the degree to which the
proposed development project fits in with the existing business environment and objectives
with regard to development schedule, delivery date, corporate culture and existing business
processes.

5
3. System Design:
3.1 Use case diagram

Use case diagrams are usually referred to as behavior diagrams used to describe a set of
actions (use cases) that some system or systems (subject) should or can perform in
collaboration with one or more external users of the system (actors). In this use case there are
2 actors – one is a regular user which only needs to login and browse, another is a casual user
who needs to register first to create account and then access the website. Both users can
access and browse restaurants based on their preferences. They can post comments and give
ratings to individual restaurants. They can also post complaints. These complaints are to be
reviewed by another actor which is the developer.

6
3.2 Activity Diagram:

7
Activity Description -
Activity diagram is basically a flowchart to represent the flow from one activity to
another activity. In this diagram user first visit the site. Can directly search through given
restaurant options, if not then enter provided options like food, area. Then further
recommendations can be narrowed by providing price and preferred area, thus enabling
system to give list of recommendations. User can further click restaurant to get related
information like food menu, photos, and directions. Further user can read reviews related to
selected restaurant or write review but in latter case user has to login. Along with restaurant
list, locations of restaurants will be highlighted in map.

3.3.1Sequence Diagram:

Sequence Diagram for Restaurant Recommendation

8
A sequence diagram simply depicts interaction between objects in a sequential order i.e. the
order in which these interactions take place. We can also use the terms event diagrams or
event scenarios to refer to a sequence diagram. Sequence diagrams describe how and in what
order the objects in a system function. In this user submit preference and ask for
recommendation, this calls method getRecommedations() for restaurants. This will involve
further process algorithm and call MySQL to get reviews as Recommended Restaurants, so
as to perform processing. Once list of restaurants is fetched, it is displayed to user.

9
3.3.2Sequence Diagram:

Sequence Diagram for Giving Rating

User get recommendation based on his/her preferences. Further user can give
feedback/reviews for visited restaurants. This diagram depicts the sequence of actions
involved in doing so. Firstly user give login credentials for signing up. Further give star
rating to restaurant. These reviews and rating are added in database, updating records of
database. Once done give successful response.

10
4. Database Design

4.1 Data Design

4.1.1 ER Diagram

11
5. Implementation

5.1 Registration Page

5.2 Login Page

12
5.3 Front Page

5.4 Browsing Page

13
5.5 Recommended Restaurant Page

Result

As per the requirements, we were able to develop a website which recommends a series of
restaurants in sorted order according to the customer requirements and specifications.
It provides an accuracy of about 73% while recommending restaurants to the customer. This
recommendation is based on the ratings previously given by other users over the yelp dataset.

14
6. Testing

6.1 Testing Methods used

Testing methodologies are approaches to testing, from unit testing through system testing and
beyond. There is no formally recognized body of testing methodologies, and very rarely will
you ever find a unified set of definitions. But here are some common methodologies
 Unit testing-The act of testing software at the most basic (object) level. Generally
performed by developers, run in "friend classes" with code-level access to read and
manipulate objects.
 Acceptance testing-Also known as acceptance tests, build verification tests, basic
verification tests, these are rudimentary tests which prove whether or not a given
build is worth deeper testing. The term "smoke test" is a colloquial term -- when
machines are built, engineers will power them up and just let them run, looking for
smoke as a sign of serious problems.
 Functional testing-Functional testing takes a user story or a product feature and tests
all of the functionality contained within that feature. For example, in a photo
application like Photoshop, functional testing would cover all the functionality
contained within a feature like opening files (resolving file paths, determining
appropriate format filters, passing the file path off to the filter) as well as handling
errors within that functionality.
 System Testing-Testing the project as a collective system. For the Photoshop
application, an example would be to open a file in a given format, manipulate that file
in various ways, and then output the file. System testing generally combines multiple
features into an end-to-end process or scenario.
 Performance Testing-Tests an application's performance characteristics, be it file
size, concurrent users, or mean-time-to-failure.
 Security Testing-A collection of tests focused on probing an application's security, or
its ability to protect user assets.
 Exploratory Testing
 Specification Based Testing

15
 Black-Box Testing
Black box testing treats the software as a “black box” i.e. without any knowledge of
internal implementation.
Black box testing methods includes
 Equivalence partitioning
 Boundary Value Analysis
 All pair testing
 Fuzz testing
 Model-Based Testing

White-Box Testing

White box testing is when the tester has access to the internal data structures and algorithms
including the code that implement these. White-box testing can be applied at the unit,
integration and system levels of the software testing process; it is usually done at the unit
level.

16
6.2 Test Cases

6.2.1 Login

S.No Input Description Output


1 Either Username or Password both Username/Password wrong
inboxes are blank and user login is empty

2 Either username/password is empty Username /Password is wrong


and user enter submit

3 Username and password both are correct User gets login


and user enter submit

6.2.2 Registration

0S. Input Description Output


No
1. All mandatory field are entered and User get Registered
submit button is clicked

2 All mandatory field are entered and No action is performed


submit button is not clicked
3 If any of the mandatory field are not Error message will be displayed
entered and submit button is clicked

17
6.2.3 Log Out

S.No Input Description Output

1. Select the log out button or session expired User should enter into login page

2. If system fails User should log out from current running


software

3. If power off User should log out from current running


software

6.2.4 Search Restaurants

S. Input Description Output


No
1 If any of the requirements searched by user Error message will be displayed
are not met
2 If the system is able to find a restaurant Restaurants will be displayed
suitable to user data
3. If the user selects a restaurant based on his Restaurant’s data will be displayed
choice
4. User gives rating to that particular restaurant Ratings are stored into the restaurant data.
5 User gives reviews to the restaurant Reviews are displayed onto the restaurant
data and are visual to every user.

18
Conclusion

While developing the system a conscious effort has been made to create and develop a
software package, making use of available tools, techniques and resources – that would
generate a proper system for Restaurant Rating and Recommendation System. While
making the system, an eye has been kept on making it as user-friendly. As such one may
hope that the system will be acceptable to any user and will adequately meet his/her needs.
With keeping in mind the state and the scope of the project, we encountered with a problem
known as the Cold Start problem. Cold start is a potential problem in computer-
based information systems which involve a degree of automated data modeling. Specifically,
it concerns the issue that the system cannot draw any inferences for users or items about
which it has not yet gathered sufficient information.

The cold start problem is a well known and well researched problem for recommender
systems. Recommender system form a specific type of information filtering (IF) technique
that attempts to present information items (e-commerce, movies, books, news, images, web
pages) that are likely of interest to the user. Typically, a recommender system compares the
user's profile to some reference characteristics. These characteristics may be related to item
characteristics (content-based filtering) or the user's social environment and past behavior
(collaborative filtering). Depending on the system, the user can be associated to various kinds
of interactions: ratings, bookmarks, purchases, likes, number of page visits etc.

There are three cases of cold start:

1. New community: refers to the start-up of the recommender, when, although a


catalogue of items might exist, almost no users are present and the lack of user
interaction makes it very hard to provide reliable recommendations
2. New item: a new item is added to the system, it might have some content information
but no interactions are present
3. New user: a new user registers and has not provided any interaction yet, therefore it is
not possible to provide personalized recommendations

19
References

[1] More information about the Yelp Dataset Challenge can be found at.
https://www.yelp.com/dataset_challenge.
[2] JSON Lab: http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?jsonlab.
[3]Additionally, we obtained a comprehensive list of categories for businesses on Yelp as a
csv file from the following source http://www.localvisibilitysystem.com/2013/07/19/yelp-
business-categories-list/

20

You might also like