ML Unit 6
ML Unit 6
ML Unit 6
Collaborative filtering
Content-based filtering
Artificial neural network
Perceptron
Multilayer network
Backpropagation
Introduction to Deep learning
Recommender System
These days whether you look at a video on YouTube, a
movie on Netflix or a product on Amazon, you're going to
get recommendations for more things to view, like or buy.
You can thank the advent of machine learning algorithms
and recommender systems for this development.
Recommender System
Recommender systems are one of the most successful
and widespread application of machine learning
technologies in business.
Recommender systems are an important class of machine
learning algorithms that offer "relevant" suggestions to
users. Categorized as either collaborative filtering or a
content-based system.
Recommender System
A recommender system is a subclass of information
filtering that seeks to predict the "rating" or "preference"
a user will give an item, such as a product, movie, song,
etc.
Recommender systems provide personalized information
by learning the user’s interests through traces of
interaction with that user.
Much like machine learning algorithms, a recommender
system makes a prediction based on a user's past
behaviors. Specifically, it’s designed to predict user
preference for a set of items based on experience.
Recommender System
Mathematically, a recommendation task is set to be:
Set of users (U)
Netflix
Article recommendations on news sites
Recommendation Engine
Till recently, people generally tended to buy products recommended to them by
their friends or the people they trust. This used to be the primary method of
purchase when there was any doubt about the product.
But with the advent of the digital age, that circle has expanded to include online
sites that utilize some sort of recommendation engine.
A recommendation engine filters the data using different algorithms
and recommends the most relevant items to users. It first captures the
past behavior of a customer and based on that, recommends products
which the users might be likely to buy.
Recommendation Engine
Q. If a completely new user visits an e-commerce site, that site will not
have any past history of that user. So how does the site go about
recommending products to the user in such a scenario?
Solution:
One possible solution could be to recommend the best selling products, i.e.
the products which are high in demand.
Content-Based Filtering
E.g. if the user has a history of watching all action movies, a newly
released action movie is recommended by this system.
However, this system does not take into account behavior/data about
other users in the system hence, if a particular action movie fetches
very low rating / negative recommendations by other users, It will still
be recommended to the user.
Content Based Filtering
Techniques used in content-based filtering are:
TF-IDF ( Term Frequency — Inverse Document Frequency)
Cosine Similarity
Content Based Filtering
TF-IDF
This technique is used in information retrieval and text mining.
TF-IDF, as the name suggests has two terms.
TF calculates normalized frequency at which a given term appears in
the document.
IDF calculates importance of a term in general. Eg. terms
‘recommendation’, ‘system’, ‘movie’ conveys more information about the
document than terms ‘the’, ‘and’, ‘are’ etc.
Content Based Filtering
TF-IDF
IDF is calculated as :
IDF(t) = log_e(Total number of documents / Number of
documents with term t in it).
Content Based Filtering
TF-IDF
movie i
Su,v is the similarity between users
Collaborative Filtering
Now, we have the ratings for users in profile vector and based on
that we have to predict the ratings for other users. Following
steps are followed to do so:
2.First we find the items rated by both the users and based on
the ratings, correlation between the users is calculated.
Collaborative Filtering
User/Movie M1 M2 M3 M4 M5 Mean
Rating
A 4 1 - 4 - 3
B - 4 - 2 3 3
C - 1 - 4 4 3
Collaborative Filtering
let’s find the similarity between users (A, C) and (B, C) in
the above table. Common movies rated by A/[ and C are
movies M2 and M4 and by B and C are movies M2, M4
and M5.
Collaborative Filtering
The correlation between user A and C is more than the
correlation between B and C. Hence users A and C
have more similarity and the movies liked by user A will
be recommended to user C and vice versa.
Collaborative Filtering
Drawback:
This algorithm is quite time consuming as it involves
calculating the similarity for each user and then
calculating prediction for each similarity score.
One way of handling this problem is to select only a few
users (neighbors)
Collaborative Filtering
There are various ways to select the neighbors:
2.Its not effective when there are a large number of users as it will
take a lot of time to compute the similarity between all user pairs.
User/Movie M1 M2 M3 M4 M5
A 4 1 2 4 4
B 2 4 4 2 1
C - 1 - 3 4
Mean Rating 3 2 3 3 3
Collaborative Filtering
item-Item collaborative filtering
To do this, first we need to find such users who have rated those
items and based on the ratings, similarity between the items is
calculated.
Let us find the similarity between movies (M1, M4) and (M1, M5).
Common users who have rated movies M1 and M4 are A and B
while the users who have rated movies M1 and M5 are also A and
B.
Collaborative Filtering
item-Item collaborative filtering
Collaborative Filtering
item-Item collaborative filtering
net input and output of each unit are computed. (There is no need for computation
and/or backpropagation of the error.)
If there is one output node per class, then the output node with the highest value
may be considered as belonging to the positive class, while values less than 0.5 may
be considered negative.
Several variations and alternatives to the backpropagation algorithm have been
proposed for classification in neural networks. These may involve the dynamic
adjustment of the network topology and of the learning rate or other parameters, or
the use of different error functions.
What is Deep Learning (DL)