You are on page 1of 19

RECOMMENDATION SYSTEM

A Seminar report submitted in partial fulfilment of the requirements for the Degree
of Bachelor of Engineering & Technology
In
Computer Engineering (CP)
Semester - IV

By

Mufaddal Challawala
Enrollment no. 12202040503008

Under supervision of
Prof. Hetal Gudani
Academic Year 2022-23 (Even)

Department of Computer Engineering


G H Patel College of Engineering & Technology
Bakrol Road, Vallabh Vidyanagar

1
CERTIFICATE
This is to certify that Seminar work embodied in this report entitled, “Recommendation System”
was carried out by Mufaddal Challawala Enrollment no. 12202040503008 at G H Patel College
of Engineering & Technology for partial fulfilment of B.E. degree to be awarded by Charutar
Vidya Mandal University (CVMU). This seminar work has been carried out under my supervision
and is to the satisfaction of department.

GUIDE Head of Department


PROF. Hetal Gudani PROF. Dr. Maulika Patel

2
Acknowledgement
The completion of any seminar work depends upon cooperation, co-ordination, and combined
efforts of several sources of knowledge. I would like to express my deepest thanks to Prof. Hetal
Gudani, for her valuable inputs, guidance, encouragement, wholehearted cooperation, and
constructive criticism throughout the duration of our project.

I hope that this seminar work report will provide all necessary information required to
readers to fulfil their aspiration. Man’s quest for knowledge never ends. Theory and practices are
essential and complimentary to each other. I would like to express my sincere thanks to Dr.
Maulika Patel (Head of Department) for wholehearted support.

3
TABLE OF CONTENT

List of Figures 5
CHAPTER 1 INTRODUCTION 6
1.1 Introduction To Recommendation System 6
CHAPTER 2 RECOMMENDATION SYSTEM 7
2.1 What Is Recommendation System? 7
2.2 Types Of Recommendation System 7
CHAPTER 3 COLLABORATIVE FILTERING 8
3.1 What Is Collaborative Filtering? 8
3.2 Types Of Collaborative Filtering 8
3.2.1 User Based Collaborative Filtering 8
3.2.2 Item Based Collaborative Filtering 9
CHAPTER 4 ITEM BASED COLLABORATIVE FILTERING 11
4.1 What Is Item Based Collaborative Filtering Algorithm 11
CHAPTER 5 ALGORITHM FOR ITEM BASED COLLABORATIVE 12
FITERING
5.1 Item Similarity Computation 12
5.2 Prediction Computation 15
CHAPTER 6 ADVANTAGES AND DISADVANTAGES OF ITEMBASED 17
COLLABORATIVE FILTERING
6.1 Advantages 17
6.2 Disadvantages 17
Conclusion 18
References 19

4
TABLE OF FIGURES

Figure No. Name Of Figure Page No.


CHAPTER 3 COLLABORATIVE FILTERING
Fig 3.1 User based filtering 9
Fig 3.2 Item based filtering 10

CHAPTER 4 ITEM BASED COLLABORATIVE FILTERING


Fig 4.1 How IBCF works 11

CHAPTER 5 ALGORITHM FOR ITEM BASED COLLABORATIVE


FITERING
Fig 5.1 Rating data set 12
Fig 5.2 Product of rating of two users 12
Fig 5.3 Square root of sum of squared ratings 13
Fig 5.4 Similarity between movie 1 and 2 13
Fig 5.5 Cosine similarity equation 14
Fig 5.6 Adjusted cosine similarity equation 14
Fig 5.7 Adjusted similarity matrix 15
Fig 5.8 Item-based Recommendation System Equation 15
Fig 5.9 Recommendation score matrix for users Equation 16

5
CHAPTER 1

INTRODUCTION
1.1 Introduction To Recommendation System

The explosive growth in the amount of available digital information and the number of visitors to
the Internet have created a potential challenge of information overload which hinders timely access
to items of interest on the Internet. Information retrieval systems, such as Google, DevilFinder and
Altavista have partially solved this problem but prioritization and personalization of information
were absent. This has increased the demand for recommender systems more than ever before.
Recommender systems are information filtering systems that deal with the problem of information
overload by filtering vital information fragment out of large amount of dynamically generated
information according to user’s preferences, interest, or observed behavior about item.
Recommender system has the ability to predict whether a particular user would prefer an item or
not based on the user’s profile.

Recommender systems (RS) are used to help users find new items or services, such as books,
music, transportation or even people, based on information about the user, or the recommended
item. These systems also play an important role in decision-making, helping users to maximize
profits or minimize risks. Recommender systems are beneficial to both service providers and users.
They reduce transaction costs of finding and selecting items in an online shopping environment.
Recommendation systems have also proved to improve decision making process and quality.

6
CHAPTER 2

RECOMMENDATION SYSTEM
2.1 What Is Recommendation System?
Recommender system is defined as a decision making strategy for users under complex
information environments. Also, recommender system was defined from the perspective of E-
commerce as a tool that helps users search through records of knowledge which is related to users’
interest and preference. Recommender system was defined as a means of assisting and augmenting
the social process of using recommendations of others to make choices when there is no sufficient
personal knowledge or experience of the alternatives. Recommender systems handle the problem
of information overload that users normally encounter by providing them with personalized,
exclusive content and service recommendations.

ML algorithms are being used in Recommendation Systems to provide users with better
recommendations. However, the ML field does not have a clear classification scheme for its
algorithms, mainly because of the number of approaches and the variations proposed in the
literature. As a consequence, it becomes difficult and confusing to choose an ML algorithm that
fits one’s need when developing an RS.

2.2 Types of Recommendation System


Recently, various approaches for building recommendation systems have been developed, these
are:

1. Collaborative Filtering
2. Content - Based Filtering
3. Hybrid Filtering
4. Stereotyping
5. Graph Based
6. Co-occurrence Recommendation
7. Global Relevance
In this report we will mainly focus on Collaborative Filtering. We will try to understand how the
Collaborative Filtering works and how it recommends item to user.

7
CHAPTER 3

COLLABORATIVE FILTERING
3.1 What Is Collaborative Filtering?
The term “collaborative filtering” was coined in 1992 by Goldberg et al. Their theory was that
users like what like-minded users like, where two users were considered like-minded when they
rated items alike. When like-minded users were identified, items that one user rated positively
were recommended to the other user, and vice versa.
Collaborative filtering is a domain-independent prediction technique for content that cannot easily
and adequately be described by metadata such as movies and music. Collaborative filtering
technique works by building a database of preferences for items by users. It then matches users
with relevant interest and preferences by calculating similarities between their profiles to make
recommendations [43]. Such users build a group called neighborhood. An user gets
recommendations to those items that he has not rated before but that were already positively rated
by users in his neighborhood. Recommendations that are produced by Collaborative Filtering can
be of either prediction or recommendation.

Collaborative filtering is the process of filtering for information or patterns using techniques
involving collaboration among multiple agents, viewpoints, data sources, etc. Applications of
collaborative filtering typically involve very large data sets. Collaborative filtering methods have
been applied to many different kinds of data including: sensing and monitoring data, such as in
mineral exploration, environmental sensing over large areas or multiple sensors; financial data,
such as financial service institutions that integrate many financial sources; or in electronic
commerce and web applications where the focus is on user data, etc.

3.2 Types of Collaborative Filtering Algorithm


There are two types of Collaborative Filtering Algorithm:

3.2.1 User Based Collaborative Filtering


User-based collaborative filtering is a type of recommendation system that works by
identifying similar users and recommending items based on their preferences. It is based on the
principle that users who have similar preferences or behaviors in the past are likely to have similar
preferences in the future. This approach compares the similarities between users and recommends
items that are highly rated by similar users.

8
In figure 3.1, you can see a picture where 3 children named A, B, C, and 4 fruits, grapes,
strawberry, watermelon, and orange respectively. Based on the image let assume ‘A’ purchased
all 4 fruits, ‘B’ purchased only strawberry and ‘C’ purchased strawberry as well as watermelon.
Here ‘A’ & ‘C’ are similar kinds of users because of this ‘C’ will be recommended Grapes and
Orange as shown in dotted line.

Fig 3.1 User based filtering

3.2.2 Item Based Collaborative Filtering Algorithm


Item-based collaborative filtering is a type of recommendation system that works by
identifying similar items and recommending them to users based on their past behavior. It is based
on the principle that users who have shown interest in one item are likely to be interested in other
similar items. This approach compares the similarities between items and recommends items that
are similar to those the user has liked in the past.
In figure 3.2, here we can see that the only difference is that we see similar items, not
similar users like if you see grapes and watermelon you will realize that watermelon is purchased
by all of them but grapes are purchased by Children ‘A’ & ‘B’. Hence Children ‘C’ is being
recommended grapes.

9
Fig 3.2 Item based filtering

10
CHAPTER 4

ITEM BASED COLLABORATIVE FILTERING


4.1 What Is Item Based Collaborative Filtering Algorithm?
Recommendation systems have been around us for quite some time now. YouTube, Facebook,
Amazon, and many others provide some sort of recommendations to their users. This not only
helps them show relevant products to users but also allows them to stand out in front of
competitors.
One such technique to recommend items to users is an item-based recommendation system also
known as item-item collaborative filtering or IBCF. Item-item collaborative filtering is one kind
of recommendation method which looks for similar items based on the items users have already
liked or positively interacted with. It was developed by Amazon in 1998 and plays a great role in
Amazon’s success.
How IBCF works is that it suggests an item based on items the user has previously consumed. It
looks for the items the user has consumed then it finds other items similar to consumed items and
recommends accordingly.
Let’s understand this with an example. Suppose our user Jhone wants to purchase a movie DVD.
Our job is to recommend him a movie based on his past preferences. We will first search for movies
that Jhone has watched or liked, let’s call those movies ‘A’, ‘B’ and ‘C’. Next, we will search for
other movies similar to three movies. Suppose we found out that movie ‘D’ is highly similar to
‘C’, therefore, there is a highly likely chance that Jhone will also like movie ‘D’ because it is
similar to one Jhone has already liked. Hence, we will suggest the movie ‘D’ to Jhone.

Fig 4.1.1 how IBCF works

11
CHAPTER 5

ALGORITHM FOR ITEM BASED COLLABORATIVE FITERING


5.1 Item Similarity Computation
Suppose we have a table of users and their ratings for movies:

Fig 5.1.1 Rating data set

Let’s pick two movies (Id 1: Toy Story and Id 2: Star Wars) for which we have to calculate the
similarity, how much these two movies are comparable to one another in terms of their likeness by
users. To compute this we will first multiply ratings of both the movies with each other and the sum
the result. Let’s call this value ‘A’.

Fig 5.1.2 Product of rating of two users

12
Second, we‘ll sum the squared movie ratings and then take the square root of them. So square all
movie 1 ratings, sum them and then take the square root to get final value (do same of movie 2).
Doing so will get us two values i.e. square root value of movie 1 and movie 2. Multiply both the
values. We call this final value ‘B’.

Fig 5.1.3 Square root of sum of squared ratings


Third, divide A and B, this will gets us a score that indicates how close movie 1 and movie 2 are
to one another.

Fig 5.1.4 Similarity between movie 1 and 2


Repeating the above process for all the movies will result in a table with similarities between each
movie. Here is how the above process is depicted in mathematical form.

13
Fig 5.1.5 Cosine similarity equation
Starting from label 1 (blue on left), above illustrates that in order to calculate the similarity between
an item ‘i’ and an item ‘j’ (consider ‘i’ and ‘j’ as movie id 1 and 2) multiple all ratings of item ‘i’
and ‘j’ given by users ‘u’ and sum them. Divided the result with the product of square root of the
sum of squared ratings of individual items given by user ‘u’.

This is exactly what we did in our excel exercise above. Iterating above for all the items will result
in a list of values that will indicate how close other items are to our main item ‘i’. This method is
also known as cosine similarity. It helps to calculate how close two vectors are to one another.

Cosine similarity works but it doesn’t take into account the optimistic behavior of users. Different
users can rate the same item differently depending upon how optimistic they are. On the scale of
5, one could rate an item 5 while another could rate 3 even though they both very much liked the
item. To account for this we have to make a small change to our similarity formula. Here is what
it looks like:

Fig 5.1.6 Adjusted cosine similarity equation


Subtracting user rating of a given item with that user’s average rating normalizes ratings to the
same scale and helps overcome optimism issues. We call it adjusted cosine similarity.

There is also a similar method where instead of subtracting with the user’s average rating we
subtract with items average rating. This helps to understand how much given user ratings deviate
from average item rating. This technique is known as Pearson similarity. Both Cosine and
Pearson are widely used methods to compute similarities.

14
Applying adjusted cosine similarity equation on ratings for items will produce a table or matrix
that’ll show how similar one item is to another. It should look something like this:

Fig 5.1.7 Adjusted similarity matrix

5.2 Prediction Computation


A table of similar items is a half job done. We know which items are comparable but we have yet
to crack the nut on which items to recommend to users from the list of similar items. For this will
have to combine our similarity matrix with users' past history of rated items to generate a
recommendation. This is easily achieved by applying IBCF’s equation.

Fig 5.8 Item-based Recommendation System Equation


Above equation elicits that in order to calculate recommendation score of an item ‘i’ for a user
‘u’ sum the multiplication of an item ‘i’ and ‘j’ similarity with the difference of rating given by
user ‘u’ to an item ‘j’ and the average rating of an item ‘j’. Divide the result with the sum of item
‘i’ and ‘j’s similarity, add the output with the user ‘u’s average rating.
Doing so will generate a matrix of scores for users and available items. Top scored items can be
recommended to the user.
15
Fig 5.9 Recommendation score matrix for users Equation

16
CHAPTER 6

ADVANTAGES AND DISADVANTAGES OF ITEM BASED


COLLABORATIVE FILTERING
6.1 Advantages
1. Scalability: Item-based collaborative filtering is highly scalable, as it does not require a
large amount of computational resources to process large datasets.
2. Better performance in sparse data: Item-based collaborative filtering can perform better in
sparse data compared to user-based collaborative filtering, as it is based on similarities
between items rather than between users.
3. Diversity in recommendations: Item-based collaborative filtering can provide more diverse
recommendations compared to user-based collaborative filtering, as it recommends items
based on their similarity to the items the user has interacted with in the past.

6.2 Disadvantages
1. Cold start problem: Item-based collaborative filtering can suffer from the cold start
problem, where the system may not be able to make accurate recommendations for new
items that have not yet been interacted with by enough users.
2. Over-reliance on popular items: Item-based collaborative filtering can also be biased
towards popular items, as they are more likely to have been interacted with by a large
number of users and therefore have more data to base recommendations on.
3. Item drift: Item-based collaborative filtering can suffer from item drift, where the similarity
between items changes over time as user behavior and preferences change.

17
CONCLUSION

Recommendation algorithms provide an effective form of targeted marketing by creating a


personalized shopping experience for each customer. A good recommendation algorithm is
scalable over very large customer bases and product catalogs, requires only sub second
processing time to generate online recommendations, is able to react immediately to changes
in a user’s data, and makes compelling recommendations for all users regardless of the number
of purchases and ratings. Unlike other algorithms, item-to-item collaborative filtering is able
to meet this challenge.

In conclusion, the recommendation system is an essential tool for businesses to enhance user
experience and increase customer satisfaction. A recommendation system can analyze
customer behavior, such as browsing history, purchase history, ratings, and reviews, and
provide personalized recommendations based on the user's preferences. The recommendation
system can be implemented in various industries, including e-commerce, entertainment, social
media, and healthcare, to name a few. The successful implementation of a recommendation
system requires a thorough understanding of the business objectives, data collection, data
preprocessing, algorithm selection, and performance evaluation.

18
REFERENCES

1) Comprehensive Guide on Item Based Collaborative Filtering by muffaddal qutbuddin.


2) Amazon.com Recommendations Item-to-Item Collaborative Filtering Greg Linden, Brent
Smith, and Jeremy York • Amazon.com.
3) Recommendation systems: Principles, methods and Evaluation F.O. Isinkaye a,*, Y.O.
Folajimi b, B.A. Ojokoh c.
4) The Use of Machine Learning Algorithms in Recommender Systems: A Systematic
Review by Ivens Portugal, Paulo Alencar, Donald Cowan.

19

You might also like