0% found this document useful (0 votes)
54 views33 pages

6CS4 ML Unit-5

This document provides an overview of recommender systems and machine learning techniques used in recommender systems. It discusses collaborative filtering, content-based filtering, and classification models. It also provides examples of how collaborative filtering and content-based filtering work. Finally, it introduces artificial neural networks and their basic structure, describing how they are inspired by biological neurons in the human brain.

Uploaded by

Nikhil Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views33 pages

6CS4 ML Unit-5

This document provides an overview of recommender systems and machine learning techniques used in recommender systems. It discusses collaborative filtering, content-based filtering, and classification models. It also provides examples of how collaborative filtering and content-based filtering work. Finally, it introduces artificial neural networks and their basic structure, describing how they are inspired by biological neurons in the human brain.

Uploaded by

Nikhil Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

 

Machine Learning
(6CS4-02)
Unit-V

-Er. Seema Kaloria


1. Collaborative filtering
1. Memory Based
2. Model Based
3. Hybrid
2. Content-based filtering
1. Term Frequency (TF)
2. Inverse Document Frequency (IDF)
Recommended 3. Artificial neural network,
system 4. Perceptron,
  5. Multilayer network,
6. Back propagation
1. A multilayer feed forward Neural Network
2. Defining a network topology
3. Back propagation
a. Algorithm
b. Example
1. Back propagation and interpretability
7. Introduction to Deep learning.
Recommended System
• Recommended systems are the systems that are designed to recommend things to the user based
on many different factors. These systems predict the most likely product that the users are most
likely to purchase and are of interest to.

• Companies like Netflix, Amazon, etc. use recommender systems to help their users to identify
the correct product or movies for them. 
 
• The recommender system deals with a large volume of information present by filtering the most
important information based on the data provided by a user and other factors that take care of the
user’s preference and interest. It finds out the match between user and item and imputes the
similarities between users and items for recommendation. 
 
• Both the users and the services provided have benefited from these kinds of systems. The quality
and decision-making process has also improved through these kinds of systems.
Why the Recommendation system?
 
•Benefits users in finding items of their interest.
•Help item providers in delivering their items to the right user.
•Identity products that are most relevant to users.
•Personalized content.
•Help websites to improve user engagement.
 
What can be Recommended?
 
There are many different things that can be recommended by the system
like movies, books, news, articles, jobs, advertisements, etc. Netflix uses a
recommender system to recommend movies & web-series to its users.
Similarly, YouTube recommends different videos. There are many
examples of recommender systems that are widely used today.
How do User and Item matching is done?
 
In order to understand how the item is recommended and how the matching is
done, let us a look at the images below;
Perfect matching may not be recommended

The above pictures show that there won't be any perfect


recommendation which is made to a user.  In the above image, a user
has searched for a laptop with 1TB HDD, 8GB ram, and an i5 processor
for 40,000₹. The system has recommended 3 most similar laptops to the
user. 
Types of Recommendation System
1. Popularity-Based Recommendation System
 It is a type of recommendation system which works on the principle of popularity
and or anything which is in trend. These systems check about the product or movie
which are in trend or are most popular among the users and directly recommend
those.
 For example, if a product is often purchased by most people then the system will
get to know that that product is most popular so for every new user who just
signed it, the system will recommend that product to that user also and chances
becomes high that the new user will also purchase that. 

Merits of popularity based recommendation system


 It does not suffer from cold start problems which means on day 1 of the business
also it can recommend products on various different filters.
•There is no need for the user's historical data.
 
Demerits of popularity based recommendation system
 Not personalized 
•The system would recommend the same sort of products/movies which are solely
based upon popularity to every other user.

 Example
•Google News: News filtered by trending and most popular news.
•YouTube: Trending videos.
2. Classification Model
  The model that uses features of both products as well as users to predict whether a user
will like a product or not.

The output can be either 0 or 1. If the user likes it then 1 and vice-versa. 

Limitations of Classification Model


It is a rigorous task to collect a high volume of information about different users and also
products.
•Also, if the collection is done then also it can be difficult to classify. 
•Flexibility issue.
3. Content-Based Recommendation System
 
It is another type of recommendation system which works on the principle of
similar content. If a user is watching a movie, then the system will check about
other movies of similar content or the same genre of the movie the user is
watching. There are various fundamentals attributes that are used to compute
the similarity while checking about similar content. 
 
To explain more about how exactly the system works, an example is stated
below: 
But How Is It Recommended? 
 
To check the similarity between the products or mobile phone in this
example, the system computes distances between them. One plus 7 and One
plus 7T both have 8Gb ram and 48MP primary camera. 
 
If the similarity is to be checked between both the products, Euclidean
distance is calculated. Here, distance is calculated based on ram and camera;
• Euclidean distance between (7T,7) is 0 whereas Euclidean distance
between (7pro,7) is 4 which means one plus 7 and one plus 7T have
similarities in them whereas one plus 7Pro and 7 are not similar products. 
 
• In order to explain the concept through this example, only the basic thing
(camera and ram) was taken but there is no restriction. We can compute
distance calculation for any of the features of the product. The basic
principle remains the same if the distance between both is 0, they are likely
to have similar content.

• There are different scenarios where we need to check about the similarities,
so there are different metrics to be used. For computing the similarity
between numeric data, Euclidean distance is used, for textual data, cosine
similarity is calculated and for categorical data, Jaccard similarity is
computed.
Merits
•There is no requirement for much of the user’s data.
•We just need item data that enable us to start giving recommendations to
users.
•A content-based recommender engine does not depend on the user’s data, so
even if a new user comes in, we can recommend the user as long as we have
the user data to build his profile.
•It does not suffer from a cold start.
 
Demerits
•Items data should be in good volume.
•Features should be available to compute the similarity.
4. Collaborative Filtering
 
• It is considered to be one of the very smart recommender systems that
work on the similarity between different users and also items that are
widely used as an e-commerce website and also online movie websites. It
checks about the taste of similar users and does recommendations. 

•  The similarity is not restricted to the taste of the user moreover there can
be consideration of similarity between different items also. The system will
give more efficient recommendations if we have a large volume of
information about users and items.
 This is the way collaborative filtering works. Mainly, there are two
approaches used in collaborative filtering stated below;
 
a) User-based nearest-neighbor collaborative filtering

Figure shows user-user collaborative filtering where there are three users A, B
and C respectively and their interest in fruit. The system finds out the users who
have the same sort of taste of purchasing products and similarity between users is
computed based upon the purchase behavior. User A and User C are similar
because they have purchased similar products.
b)Item-based nearest-neighbour collaborative filtering

Figure shows user X, Y, and Z respectively. The system checks the items that
are similar to the items the user bought. The similarity between different items
is computed based on the items and not the users for the prediction. Users X
and Y both purchased items A and B so they are found to have similar tastes.
Limitations

• Enough users required to find a match. To overcome such cold start


problems, often hybrid approaches are made use of between CF and
Content-based matching.
• Even if there are many users and many items that are to be
recommended often, problems can arise of user and rating matrix to be
sparse and will become challenging to find out about the users who
have rated the same item.
• The problem in recommending items to the user due to sparsity
problems.
Introduction to Neural Network
• Neural Networks are networks of neurons, for example, as found in real
(i.e. biological) brains.
• Artificial neurons are crude approximations of the neurons found in
real brains. They may be physical devices, or purely mathematical
constructs.
• Artificial Neural Networks (ANNs) are networks of Artific ial Neurons
and hence constitute crude approximations to parts of real brains.
Basic Structure of ANNs
• The idea of ANNs is based on the belief that working of human brain by
making the right connections, can be imitated using silicon and wires as
living neurons and dendrites.
• The human brain is composed of 86 billion nerve cells called neurons. They
are connected to other thousand cells by Axons.
• A neuron can then send the message to other neuron to handle the issue
or does not send it forward.
• ANNs are composed of multiple nodes, which imitate biological neurons of
human brain.
• The neurons are connected by links and they interact with each other. The
nodes can take input data and perform simple operations on the data. The
result of these operations is passed to other neurons. The output at each
node is ca lled its activation or node value.
• Each link is associated with weight. ANNs are capable of learning, which
takes place by altering weight values.
Basic Structure of
ANN
“Artificial Neural Networks or ANN is an information processing paradigm that is inspired by
the way the biological nervous system such as brain process information. It is composed of large
number of highly interconnected processing elements(neurons) working in unison to solve a
specific problem.”
Working of
ANNs
• Each arrow represents a connection between two neurons
and indicates the pathway for the flow of information.
Each connection has a weight, an integer number that
controls the signal between the two neurons.
• If the network generates a “good or desired” output, there
is no need to adjust the weights. However, if the network
generates a “poor or undesired” output or an error, then
the system alters the weights in order to improve
subsequent results.
Perceptron
• A perceptron is a
network neural (an
neuron)
unit artificial
that
computations does
features certain
business
to
or
intelligence in the inputdetect
data.
• Inputs are summed and
passed through a nonlinear
function to produce output.
• Every neuron holds an internal
state called activation
signal.
• Every neuron is connected to
another neuron via
connection link
Perceptron Function

Perceptron is a function that maps its input “x,” which is multiplied with the
learned weight coefficient; an output value ”f(x)”is generated. In the equation
given above:

w = vector of real-valued weights


b = bias (an element that adjusts the boundary away from origin without any
dependence on the input value)
x = vector of input x values
Perceptron Learning Rule
• Perceptron Learning Rule states that the algorithm would
automatically learn the optimal weight coefficients. The input
features are then multiplied with these weights to determine if a
neuron fires or not.
• The Perceptron receives multiple input signals, and if the sum of the
input signals exceeds a certain threshold, it either outputs a signal or
does not return an output.
Types of Artificial Neural Networks
• There are two Artificial Neural Network topologies − Feed-Forward and
Feedback.

Feed-Forward ANN

• In this ANN, the information flow is unidirectional. A unit sends information to


other unit from which it does not receive any information. There are no
feedback loops.
• They are used in pattern generation/recognition /classification. They have
fixed inputs and outputs.
• Two different classes :
• Single Layer Feed Forward
• Multi Layer Feed Forward

Feedback ANN

• Feedback loops are allowed. They are used in content addressable


memories.
Single Layer Feed-
• Forward
The simplest kind of neural
network is a single layer
perceptron network, which
consists of a single layer of
output nodes; the inputs are
fed directly to the output
nodes via a series of
weights.

• Sum of the products of the


weights and the inputs is
calculated in each node. If
the value the
threshold is above some
take
the
neuronactivated value s
otherwise and
deactivated
it take
values. s
Multi Layer Feed-Forward
• This class of networks
consists of multiple layers
of computational units,
usually interconnected in
a feed forward way.
• Each neuron in one layer
has directed connections
to the neurons of the next
layer.
• The units of these networks
apply a sigmoid function
as an activation function.
Machine Learning in ANNs
• ANNs are capable of learning and they need to be trained.
There are several learning strategies −
• Supervised Learning − It involves a teacher that is scholar than
the ANN itself. For example, the teacher feeds some example
data about which the teacher already knows the answers.
For example, pattern recognizing.
• Unsupervised Learning − It is required when there is no example
data set with known answers. For example, searching for a
hidden pattern. In this case, clustering i.e. dividing a set of
elements into groups according to some unknown pattern is
carried out based on the existing data sets present.
• Reinforcement Learning − This strategy built on observation. The
ANN makes a decision by observing its environment. If the
observation is negative, the network adjusts its weights to be
able to make a different required decision the next time.
Inroduction to Backpropagation
• Backpropagation is a multi layered feed forward, supervised
learning network based on gradient descent learning rule( a first
order repeated optimization algorithm).
• It calculates gradient of a loss function with respect to all the
weights in the network, so that the gradient is fed to the
optimization method which in turn uses it to update the weights,
in an attempt to minimize the loss function.
• Propagates backward to adjust for errors from outputs to hidden
layers to inputs
Backpropagation
error. Algorithm
• Computes error term for the output units using the observed

• From output layer, repeat


o Propagating the error term back to the previous layer and
o Updating the weights between the two layers until the
earliest hidden layer is reached.
Introduction to Deep Learning
A branch of machine learning based on a set of algorithms that
attempt to model high level abstractions in data by using multiple
processing layers.
Thank You

Queries!!

You might also like