You are on page 1of 21

CS-51322-Service Oriented

Architecture: Concept &


Technology

Capstone Project

Book Recommendation System

[TTN-652]

Submitted Date:

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
CS-51322 Book Recommendation System
developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Document History
Date Versio By Remarks
n

4 Mar 2020 1.0 TNT-652 Version 1

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Contents at a Glance
Acknowledge.................................................................................................................. 5
Abstract.......................................................................................................................... 6
1. Introduction.......................................................................................................... 7
2. Project Specification.............................................................................................9
3. Background Theory............................................................................................10
4. Design................................................................................................................ 11
5. Testing............................................................................................................... 12
6. Application Configuration...................................................................................13
7. Conclusion......................................................................................................... 14
Tables and Figures.......................................................................................................15
Indexes......................................................................................................................... 16

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Table of Contents
Acknowledgement.....................................................................................................................5
Abstract....................................................................................................................................6
1. Introduction....................................................................................................................7
1.1. Introduction...................................................................................................................7
1.2. Objectives of the System.................................................................................................7
1.3. Problem statement..........................................................................................................8
1.4. Requirement..................................................................................................................8
2. Project Specification.....................................................................................................10
2.1. Dataset........................................................................................................................10
2.2. Manual Calculation Steps of K Nearest Neighbor............................................................10
2.3. System Flowchart.........................................................................................................12
3. Background Theory......................................................................................................13
3.1. KNN Collaborative Filtering Algorithm.........................................................................13
3.2. User Similarity Computing (Euclidean Distance)............................................................13
3.3. K Nearest Neighbors Selection......................................................................................14
4. Design.........................................................................................................................15
4.1. Database Design...........................................................................................................15
4.2. User Interface Design...................................................................................................16
5. Testing.........................................................................................................................16
5.1. Testing Method............................................................................................................16
5.2. Test Result...................................................................................................................16
5.3. Please fill concerned with your project...........................................................................17
6. Application Configuration.............................................................................................17
6.1. Software Requirement..................................................................................................17
6.2. Hardware Requirement.................................................................................................18
7. Conclusion...................................................................................................................18
7.1. Limitations..................................................................................................................18
7.2. Future work.................................................................................................................18
Tables and Figures...................................................................................................................19
Figures...................................................................................................................................19
Tables....................................................................................................................................19
Indexes...................................................................................................................................20
Keywords...............................................................................................................................20

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Acknowledgement

On the submission of my term paper, I would like to express my


gratitude and my sincere thanks to my supervisor Prof. Dr.Swe Zin Hlaing,
Department of Information System, for her constant motivation and support in
carrying out this term paper. I truly appreciate and value her esteemed guidance
and encouragement from the beginning to the end of this term paper. I would
like to thank all the teachers for their support during the making of this project.
Lastly, it’s a privilege for me to have people like my colleagues aiding me
throughout the process.

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Abstract

In this paper, it is described how books are recommended using KNN


(K- Nearest Neighbor) algorithm. Recommendation systems are used for the
purpose of suggesting items to purchase or to see. They direct users towards
those items which can meet their needs through cutting down large database of
Information. The system provides rating method which allows users to give
rating for each books and user can see books information such as book title,
authors, publication year and genres. The system provides recommendation to
users according to users’ preferences.

1. Introduction

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
1.1. Introduction

Recommendation systems are used in hundreds of different services-


everywhere from online shopping to music/movies and many. Recommender
systems typically produce a list of recommendations in one of two ways –
through collaborative filtering or through content based filtering (also known as
the personality based approach). Collaborative filtering approaches build a
model from a user's past behavior (items previously purchased or selected
and/or numerical ratings given to those items) as well as similar decisions made
by other users. This model is then used to predict items (or ratings for items)
that the user may have an interest in.
Collaborative filtering algorithm is a memory-based algorithm known as KNN.
Nearest neighbor algorithms are a family of popular non-probabilistic CF
techniques. This technique computes the similarity between either users (user-
to-user based CFs) or items (item-to-item based CFs).

1.2. Objectives of the System

Recommender systems are widely used in several different domains for


the recommendation articles, music, movies and books. Recommendation
books using users’ rating help them determine which books are appropriate to
users’ preferences grouping the similar users with same taste.
The main objectives of book recommendation system are –
 To reduce researching online over redundant information on what might
be the best ones for you
 To help the users to manage their reading list by knowing their
preference.
 To predict the interest of a user and recommend products that match
their interest as accurately as possible.

This paper describes –


 How to calculate user similarities according to users’ rating by using
K Nearest Neighbors algorithm.

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
 By seeing recommendation, the user can easily know which books
are suitable with his/her preference.

1.3. Problem statement


According to Google Books Search, there were about 130 million books
in the world in 2010, and the number just keeps rising. Avid readers with higher
education and higher income will probably read only about 1000 books in their
lifetime (15 books per year for 70 years), so having some guidance what to read
next is necessary.
Word of mouth and top bestseller lists have been frequent sources for
book recommendations in the past. However, those approaches usually don’t
take reader’s preferences and leave a chance of keeping the reader in the
bubble of like-minded readers. 
With the rise of the Internet and World Wide Web, people have started
to share online what they read and how they like it. A book recommender
system might take people’s book reviews and ratings, analyze them, and find
similar books or readers. When a person uses the recommender system by
supplying his or her preferences, the system finds books that the reader did not
read yet.

1.4. Requirement

Scope

 To get Recommendations, the user need to sign up with his/her


information.
 If the user already sign up, user need to log in remembering his/her
user_id to get book information page to rate the books that the user
already read.
 Users can rate the particular books within range 1 to 5, and then get
recommended books concerning his/her preferences.

Requirement

 The system shall display 20 books with highest rating count including

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
information like authors, book title and publication year.
 The system shall allow users to rate each particular book that user want
to.
 The system is inquired users’ rating for some books to calculate
similarities between users with applied dataset, and then the complete
result would be displayed on the result page based on users’ similar
taste.
 The system shall provide for each books information including digital
image.

Technologies to be used

 Eclipse MARS 2.0


 Apache Tomcat V.7.0
 MySQL Workbench 8.0
 Xampp

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
2. Project Specification

2.1. Dataset

Goodreads is the world’s largest site for readers and book


recommendations. As such, it is one of the best places to find datasets for
building book recommender systems. Zygmunt Zajac prepared goodbooks-10k:
a dataset that contains 6 million ratings for 10,000 most 5 popular books on
Goodreads from more than 50,000 users.
The dataset contains 5 csv files:
 ratings.csv
 to_read.csv
 books.csv
 book_tags.csv
 tags.csv
For this project, ratings and books tables are used to apply and created
users table by myself for user information. In rating table, it includes user_id,
book_id and rating columns. In books table, book_id, author,
original_publication_year, title and image_url colums are included, and user_id,
name and password columns are in users table.
(200 users and 3000 books records)

2.2. Manual Calculation Steps of K Nearest Neighbor

K = sqrt (number of samples in dataset) / 2


x = Inquired User Data
y = Data of applied dataset

2 2 2

d ( x , y )=d ( y , x )= ( x 1− y 1 ) + ( x 2− y 2 ) +…+ ( x n− y n )

n
¿ √∑
i=1
2
( x 1− y 1 ) .

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Table 2.1- Calculation of distances between user input data and the
applied dataset

X1 Y1 X2 Y2 X3 Y3 X4 Y4 X5 Y5 X6 Y6 X7 Y7 X8 Y8 Distances
1 5 4 4 3 2 5 3 5 5 2 3 3 5 4 4 4 5.0000
2 4 2 3 4 5 5 5 4 3 5 4 5 4 4 5 3 3.8729
3 5 5 3 5 5 3 4 5 5 4 5 4 3 4 4 4 3.4641
4 4 4 3 5 5 5 4 3 4 4 5 4 4 5 3 5 3.3166
5 3 5 4 4 3 3 4 4 5 5 5 4 5 5 4 4 2.2360

In first step, x values and y values are applied in the above formula and
calculated results are presented in the Distance table.

Table 2.2 Sorting stage of the calculated results

No Distance Ascending Order UserID


1 5.0000 5 201
2 3.8729 4 56
3 3.4641 3 44
4 3.3166 2 77
5 2.2360 1 198

The results from above table are sorted in ascending order to find out
the nearest distance between user’s data and applied data based on users’
input rating. After sorting has been carried out, it can be seen that no 5 has the
nearest distance therefore UserID 198 is the most similar with new user.
If the system gets the closest user, display books with highest rating(5)
that hasn’t been rated by new user given by UserID 198.

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
2.3. System Flowchart

Figure 1 – Flowchart of Book Recommendation System

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
3. Background Theory

3.1. KNN Collaborative Filtering Algorithm

KNN collaborative filtering algorithm, which is a collaborative filtering


algorithm combined with KNN algorithm, use KNN algorithm to select neighbors.
The basic steps of the algorithm are user similarity calculation, KNN nearest
neighbor selection and predict score calculation

Figure 2 – Collaborative Filtering

3.2. User Similarity Computing (Euclidean Distance)

This metric is very simple and it is simply the distance between two points
in the space. For example if we have N dimensional space for users User1(x1,
x2, x3, …xn) and User2(y1, y2,y3, …yn) the distance between them is:

2 2 2

d ( p , q )=d ( q , p )= ( q1 −p 1 ) + ( q2 −p 2 ) + …+ ( q n− pn )
n
¿ √ ∑ ( q 1− p1 )2
i=1

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
The above formula takes in n number of dimensions. The data point
which is located at the minimum distance from the test point is assumed to
belong to the same class.

3.3. K Nearest Neighbors Selection

After the calculation of similarity between users, then the


algorithm selects a number of users the highest similarity as the U’s
neighbor, denoted as u'. set a fixed value K for the neighbor selection,
select only the most K high similarity as neighbors regardless of the
value of the neighbor similarity of users.

Figure 3 – K Nearest Neighbors with k=7

4. Design

4.1. Database Design

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
The dataset is stored in above structure in .csv format. The dataset consists
of 3000 records with six attributes in books table and over 10000 records with
three attributes in Rating table.

4.2. User Interface Design

Figure 1 - Figure caption (must be under the figure)

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
5. Testing

5.1. Testing Method

5.2. Test Result

Table 1 – Experiment Result

5.3. Please fill concerned with your project

Table 2 – xxxxxxx

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Table 3 – yyyyyyx

6. Application Configuration

6.1. Software Requirement

Database MySQL
Language HTML, JSP, servlet
Servlet Apache Tomcat 7.0, Xampp Apache
Webserver
Web Browser Chrome
Documentation Tool Microsoft Word 2016

6.2. Hardware Requirement

Processor 2.20 GHz CPU, Intel Core i5


RAM 4 GB

7. Conclusion

Under the condition of massive information, the requirements of book


recommendation system are increasing. This article designs and implements a
CS-51322 Book Recommendation System
developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
complete book recommendation system prototype based on the KNN algorithm,
collaborative filtering algorithm and recommendation system technology. We
give a detailed design and development process.
This paper has reference significance for the development of personalized
recommendation technology.

7.1. Limitations

The dataset used for this system has lack of book genres. Therefore,
when user similarities measure, most of the users’ distance are near
because of less rating range.

7.2. Future work

This system provides rating method, so I would like to provide


considering book genres and more attributes in calculation nearest
features to be able to recommend books with better accuracy. And then
trying in content based and hybrid recommendation method in future
work.

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Tables and Figures

Figures

Figure 6 - Figure caption (must be under the figure)............................................................16

Tables

Table 1 – Experiment Result.............................................................................................16


Table 2 – xxxxxxx...........................................................................................................17
Table 3 – yyyyyyx...........................................................................................................17

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/
Indexes

Keywords
No index entries found

CS-51322 Book Recommendation System


developed by Wutt Hmone Phoo -UIT, The Republic of Union of Myanmar
/

You might also like