You are on page 1of 33

Learning Algorithms in Machine Learning

LEARNING ALGORITHMS
 Machine learning algorithms are classified into 4 types:

 Supervised Learning
 Unsupervised Learning
 Semi-supervised Learning
 Reinforcement Learning
SUPERVISED LEARNING

 In Supervised Learning, the machine learns under supervision. It


contains a model that is able to predict with the help of a labeled
dataset. A labeled dataset is one where you already know the
target answer.
 Supervised learning is a process of providing input data as well
as correct output data to the machine learning model. The aim of
a supervised learning algorithm is to find a mapping function to
map the input variable(x) with the output variable(y).
 In this case, we have images that are labeled a spoon or a knife. This known
data is fed to the machine, which analyzes and learns the association of
these images based on its features such as shape, size, sharpness, etc.

 Now when a new image is fed to the machine without any label, the
machine is able to predict accurately that it is a spoon with the help of the
past data
 The machine is already trained on all types of shapes, and when it finds a new
shape, it classifies the shape on the bases of a number of sides, and predicts the
output.
SUPERVISED LEARNING
 Supervised learning can be further divided into two types:
 Classification
 Regression
 Classification - Supervised Learning
 Classification is used when the output variable is categorical i.e.
with 2 or more classes. For example, yes or no, male or female,
true or false, etc.
CLASSIFICATION - SUPERVISED LEARNING
REGRESSION - SUPERVISED LEARNING
 Regression is used when the output variable is a real or
continuous value.
 In this case, there is a relationship between two or more
variables i.e., a change in one variable is associated with a
change in the other variable.
 For example, salary based on work experience or weight based
on height, etc.
REGRESSION - SUPERVISED LEARNING

 Let’s consider two variables - humidity and temperature. Here, ‘temperature’ is the
independent variable and ‘humidity' is the dependent variable. If the temperature
increases, then the humidity decreases.
 These two variables are fed to the model and the machine learns the relationship
between them. After the machine is trained, it can easily predict the humidity
based on the given temperature.
ADVANTAGES OF SUPERVISED LEARNING:
 With the help of supervised learning, the model can predict the
output on the basis of prior experiences.
 In supervised learning, we can have an exact idea about the
classes of objects.
DISADVANTAGES OF SUPERVISED LEARNING:
 Supervised learning models are not suitable for handling the
complex tasks.
 Supervised learning cannot predict the correct output if the test
data is different from the training dataset.
 Training required lots of computation times.
 In supervised learning, we need enough knowledge about the
classes of object.
REAL-LIFE APPLICATIONS OF SUPERVISED LEARNING
 Risk Assessment
 Supervised learning is used to assess the risk in financial services
or insurance domains in order to minimize the risk portfolio of the
companies.
 Image Classification
 Image classification is one of the key use cases of demonstrating
supervised machine learning. For example, Facebook can recognize
your friend in a picture from an album of tagged photos.
 Fraud Detection
 To identify whether the transactions made by the user are authentic
or not.
 Visual Recognition
 The ability of a machine learning model to identify objects, places,
people, actions, and images.
UNSUPERVISED LEARNING
 In Unsupervised Learning, the machine uses unlabeled data and
learns on itself without any supervision. The machine tries to find
a pattern in the unlabeled data and gives a response.
 Let's take a similar example is before, but this time we do not tell the machine
whether it's a spoon or a knife. The machine identifies patterns from the given
set and groups them based on their patterns, similarities, etc.
WHY USE UNSUPERVISED LEARNING?
 Unsupervised learning is helpful for finding useful insights from
the data.
 Unsupervised learning is much similar as a human learns to
think by their own experiences, which makes it closer to the real
AI.
 Unsupervised learning works on unlabeled and uncategorized
data which make unsupervised learning more important.
 In real-world, we do not always have input data with the
corresponding output so to solve such cases, we need
unsupervised learning.
UNSUPERVISED LEARNING
 Unsupervised learning can be further grouped into types:
 Clustering
 Association
CLUSTERING - UNSUPERVISED LEARNING
 Clustering is the method of dividing the objects into clusters that
are similar between them and are dissimilar to the objects
belonging to another cluster.
 For example, finding out which customers made similar product
purchases.
ASSOCIATION - UNSUPERVISED LEARNING
 Association is a rule-based machine learning to discover the
probability of the co-occurrence of items in a collection. For
example, finding out which products were purchased together.
 Let’s say that a customer goes to a supermarket and buys bread, milk, fruits,
and wheat..
 Another customer comes and buys bread, milk, rice, and butter.
 Now, when another customer comes, it is highly likely that if he buys bread,
he will buy milk too.
 Hence, a relationship is established based on customer behavior and
recommendations are made
UNSUPERVISED LEARNING
 Advantages of Unsupervised Learning
 Unsupervised learning is used for more complex tasks as compared to
supervised learning because, in unsupervised learning, we don't have
labeled input data.
 Unsupervised learning is preferable as it is easy to get unlabeled data in
comparison to labeled data.
 Disadvantages of Unsupervised Learning
 Unsupervised learning is intrinsically more difficult than supervised
learning as it does not have corresponding output.
 The result of the unsupervised learning algorithm might be less accurate
as input data is not labeled, and algorithms do not know the exact output
in advance.
REAL-LIFE APPLICATIONS OF UNSUPERVISED LEARNING
 Market Basket Analysis
 Delivery Store Optimization
 Identifying Accident Prone Areas
SEMI-SUPERVISED LEARNING
 Semi-Supervised learning is a type of Machine Learning
algorithm that represents the intermediate ground between
Supervised and Unsupervised learning algorithms. It uses the
combination of labeled and unlabeled datasets during the
training period.
 Semi-supervised learning is an important category that lies
between the Supervised and Unsupervised machine learning.
 Although Semi-supervised learning is the middle ground between
supervised and unsupervised learning and operates on the data
that consists of a few labels, it mostly consists of unlabeled data.
 As labels are costly, but for the corporate purpose, it may have
few labels.
SEMI-SUPERVISED LEARNING
 The basic disadvantage of supervised learning is that it requires hand-
labeling by ML specialists or data scientists, and it also requires a high
cost to process.
 Further unsupervised learning also has a limited spectrum for its
applications.
 To overcome these drawbacks of supervised learning and unsupervised
learning algorithms, the concept of Semi-supervised learning is
introduced.
 In this algorithm, training data is a combination of both labeled and
unlabeled data.
 However, labeled data exists with a very small amount while it consists
of a huge amount of unlabeled data.
 Initially, similar data is clustered along with an unsupervised learning
algorithm, and further, it helps to label the unlabeled data into labeled
data.
 It is why label data is a comparatively, more expensive acquisition than
unlabeled data.
SEMI-SUPERVISED LEARNING
 We can imagine these algorithms with an example.
 Supervised learning is where a student is under the supervision
of an instructor at home and college.
 Further, if that student is self-analyzing the same concept without
any help from the instructor, it comes under unsupervised
learning.
 Under semi-supervised learning, the student has to revise itself
after analyzing the same concept under the guidance of an
instructor at college.
SEMI-SUPERVISED LEARNING
 Pick up the large unlabelled dataset
 Label a small portion of dataset
 Put the unlabelled dataset into clusters using unsupervised
Machine Learning Algorithms.
 Build your model to use the labelled data to label and classify
the rest of the data.
REAL-WORLD APPLICATIONS OF SEMI-
SUPERVISED LEARNING
 Speech Analysis- It is the most classic example of semi-supervised learning
applications. Since, labeling the audio data is the most impassable task that
requires many human resources, this problem can be naturally overcome with the
help of Semi-supervised learning model.
 Web content classification- However, this is very critical and impossible to label
each page on the internet because it needs mode human intervention. Still, this
problem can be reduced through Semi-Supervised learning algorithms.
 Further, Google also uses semi-supervised learning algorithms to rank a webpage
for a given query.
 Protein sequence classification- DNA strands are larger, they require active human
intervention. So, the rise of the Semi-supervised model has been proximate in this
field.
 Text document classifier- As we know, it would be very unfeasible to find a large
amount of labeled text data, so semi-supervised learning is an ideal model to
overcome this.
SEMI-SUPERVISED LEARNING TECHNIQUES
 S3VM/TSVM
 Graph based
 Generative model
REINFORCEMENT LEARNING
 Reinforcement Learning is a feedback-based Machine learning
technique in which an agent learns to behave in an environment
by performing the actions and seeing the results of actions. For
each good action, the agent gets positive feedback, and for each
bad action, the agent gets negative feedback or penalty.
 In Reinforcement Learning, the agent learns automatically using
feedbacks without any labeled data, unlike supervised learning.
 Since there is no labeled data, so the agent is bound to learn by
its experience only.
 Example: The problem is as follows:
 We have an agent and a reward, with many hurdles in between.
 The agent is supposed to find the best possible path to reach the
reward..
 The image shows the robot, diamond, and fire.
 The goal of the robot is to get the reward that is
the diamond and avoid the hurdles that are
fired.
 The robot learns by trying all the possible paths
and then choosing the path which gives him the
reward with the least hurdles.
 Each right step will give the robot a reward and
each wrong step will subtract the reward of the
robot.
 The total reward will be calculated when it
reaches the final reward that is the diamond.
REINFORCEMENT LEARNING
 Reinforcement Learning solves a specific type of problem where
decision making is sequential, and the goal is long-term, such as
game-playing, robotics, etc.
 The agent interacts with the environment and explores it by itself. The
primary goal of an agent in reinforcement learning is to improve the
performance by getting the maximum positive rewards.
 The agent learns with the process of hit and trial, and based on the
experience, it learns to perform the task in a better way.
 Hence, we can say that "Reinforcement learning is a type of machine
learning method where an intelligent agent (computer program)
interacts with the environment and learns to act within that
REINFORCEMENT LEARNING
 It is a core part of Artificial intelligence, and all AI agent works on the
concept of reinforcement learning. Here we do not need to pre-program
the agent, as it learns from its own experience without any human
intervention.
 The agent continues doing these three things (take action, change
state/remain in the same state, and get feedback), and by doing these
actions, he learns and explores the environment.
 The agent learns that what actions lead to positive feedback or rewards
and what actions lead to negative feedback penalty. As a positive
reward, the agent gets a positive point, and as a penalty, it gets a
negative point.
REINFORCEMENT LEARNING
 Main points in Reinforcement learning –
 Input: The input should be an initial state from which the model
will start
 Output: There are many possible outputs as there are a variety of
solutions to a particular problem
 Training: The training is based upon the input, The model will
return a state and the user will decide to reward or punish the
model based on its output.
 The model keeps continues to learn.
 The best solution is decided based on the maximum reward.

You might also like