UNIT – 1: SUPERVISED LEARNING ALGORITHM
INTRODUCTION
In the real world, we are surrounded by humans who can learn everything from their experiences with
their learning capability, and we have computers or machines which work on our instructions. But
can a machine also learn from experiences or past data like a human does? So here comes the role
of Machine Learning.
A subset of artificial intelligence known as machine learning focuses primarily on the creation of
algorithms that enable a computer to independently learn from data and previous experiences. Arthur
Samuel first used the term "machine learning" in 1959.
How does Machine Learning work?
A machine learning system builds prediction models, learns from previous data, and predicts the
output of new data whenever it receives it. The amount of data helps to build a better model that
accurately predicts the output, which in turn affects the accuracy of the predicted output.
Features of Machine Learning
➢ Machine learning uses data to detect various patterns in a given dataset.
➢ It can learn from past data and improve automatically.
➢ It is a data-driven technology.
➢ Machine learning is much similar to data mining as it also deals with the huge amount of the
data.
TYPES OF LEARNING
At a broad level, machine learning can be classified into three types:
1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning
,1. Supervised Learning: In supervised learning, sample labeled data are provided to the machine
learning system for training, and the system then predicts the output based on the training data. The
system uses labeled data to build a model that understands the datasets and learns about each one.
After the training and processing are done, we test the model with sample data to see if it can
accurately predict the output. Supervised learning can be grouped further in two categories of
algorithms:
➢ Classification
➢ Regression
2. Unsupervised Learning: Unsupervised learning is a learning method in which a machine learns
without any supervision. The training is provided to the machine with the set of data that has not been
labeled, classified, or categorized, and the algorithm needs to act on that data without any
supervision. The goal of unsupervised learning is to restructure the input data into new features or a
group of objects with similar patterns. It can be further classifieds into two categories of algorithms:
➢ Clustering
➢ Association
3. Reinforcement Learning: Reinforcement learning is a feedback-based learning method, in which
a learning agent gets a reward for each right action and gets a penalty for each wrong action. The
agent learns automatically with these feedbacks and improves its performance. In reinforcement
learning, the agent interacts with the environment and explores it. The goal of an agent is to get the
most reward points, and hence, it improves its performance.
APPLICATIONS OF MACHINE LEARNING
Machine learning is a buzzword for today's technology, and it is growing very rapidly day by day. We
are using machine learning in our daily life even without knowing it such as Google Maps, Google
assistant, Alexa, etc. Below are some most trending real-world applications of Machine Learning:
1. Image Recognition: Image recognition is one of the most common applications of machine
learning. It is used to identify objects, persons, places, digital images, etc. The popular use case of
image recognition and face detection is, Automatic friend tagging suggestion:
2. Speech Recognition: Speech recognition is a process of converting voice instructions into text,
and it is also known as "Speech to text", or "Computer speech recognition." At present, machine
learning algorithms are widely used by various applications of speech recognition. Google
assistant, Siri, Cortana, and Alexa are using speech recognition technology to follow the voice
instructions.
3. Traffic prediction: If we want to visit a new place, we take help of Google Maps, which shows us
the correct path with the shortest route and predicts the traffic conditions. It predicts the traffic
conditions such as whether traffic is cleared, slow-moving, or heavily congested with the help of two
ways:
➢ Real Time location of the vehicle form Google Map app and sensors
➢ Average time has taken on past days at the same time.
, 4. Product recommendations: Machine learning is widely used by various e-commerce and
entertainment companies such as Amazon, Netflix, etc., for product recommendation to the user.
Whenever we search for some product on Amazon, then we started getting an advertisement for the
same product while internet surfing on the same browser and this is because of machine learning.
5. Self-driving cars: One of the most exciting applications of machine learning is self-driving cars.
Machine learning plays a significant role in self-driving cars. Tesla, the most popular car
manufacturing company is working on self-driving car. It is using unsupervised learning method to
train the car models to detect people and objects while driving.
6. Email Spam and Malware Filtering: Whenever we receive a new email, it is filtered
automatically as important, normal, and spam. We always receive an important mail in our inbox
with the important symbol and spam emails in our spam box, and the technology behind this is
Machine learning.
7. Virtual Personal Assistant: We have various virtual personal assistants such as Google
assistant, Alexa, Cortana, Siri. As the name suggests, they help us in finding the information using
our voice instruction. These assistants can help us in various ways just by our voice instructions such
as Play music, call someone, open an email, Scheduling an appointment, etc.
8. Online Fraud Detection: Machine learning is making our online transaction safe and secure by
detecting fraud transaction. Whenever we perform some online transaction, there may be various
ways that a fraudulent transaction can take place such as fake accounts, fake ids, and steal money in
the middle of a transaction. So, to detect this, Feed Forward Neural network helps us by checking
whether it is a genuine transaction or a fraud transaction.
9. Stock Market trading: Machine learning is widely used in stock market trading. In the stock
market, there is always a risk of up and downs in shares, so for this machine learning's long short-
term memory neural network is used for the prediction of stock market trends.
10. Automatic Language Translation: Nowadays, if we visit a new place and we are not aware of
the language then it is not a problem at all, as for this also machine learning helps us by converting
the text into our known languages. Google's GNMT (Google Neural Machine Translation) provide
this feature, which is a Neural Machine Learning that translates the text into our familiar language,
and it called as automatic translation.
SUPERVISED LEARNING
Supervised learning is the types of machine learning in which machines are trained using well
"labelled" training data, and on basis of that data, machines predict the output. The labelled data
means some input data is already tagged with the correct output.
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).
INTRODUCTION
In the real world, we are surrounded by humans who can learn everything from their experiences with
their learning capability, and we have computers or machines which work on our instructions. But
can a machine also learn from experiences or past data like a human does? So here comes the role
of Machine Learning.
A subset of artificial intelligence known as machine learning focuses primarily on the creation of
algorithms that enable a computer to independently learn from data and previous experiences. Arthur
Samuel first used the term "machine learning" in 1959.
How does Machine Learning work?
A machine learning system builds prediction models, learns from previous data, and predicts the
output of new data whenever it receives it. The amount of data helps to build a better model that
accurately predicts the output, which in turn affects the accuracy of the predicted output.
Features of Machine Learning
➢ Machine learning uses data to detect various patterns in a given dataset.
➢ It can learn from past data and improve automatically.
➢ It is a data-driven technology.
➢ Machine learning is much similar to data mining as it also deals with the huge amount of the
data.
TYPES OF LEARNING
At a broad level, machine learning can be classified into three types:
1. Supervised learning
2. Unsupervised learning
3. Reinforcement learning
,1. Supervised Learning: In supervised learning, sample labeled data are provided to the machine
learning system for training, and the system then predicts the output based on the training data. The
system uses labeled data to build a model that understands the datasets and learns about each one.
After the training and processing are done, we test the model with sample data to see if it can
accurately predict the output. Supervised learning can be grouped further in two categories of
algorithms:
➢ Classification
➢ Regression
2. Unsupervised Learning: Unsupervised learning is a learning method in which a machine learns
without any supervision. The training is provided to the machine with the set of data that has not been
labeled, classified, or categorized, and the algorithm needs to act on that data without any
supervision. The goal of unsupervised learning is to restructure the input data into new features or a
group of objects with similar patterns. It can be further classifieds into two categories of algorithms:
➢ Clustering
➢ Association
3. Reinforcement Learning: Reinforcement learning is a feedback-based learning method, in which
a learning agent gets a reward for each right action and gets a penalty for each wrong action. The
agent learns automatically with these feedbacks and improves its performance. In reinforcement
learning, the agent interacts with the environment and explores it. The goal of an agent is to get the
most reward points, and hence, it improves its performance.
APPLICATIONS OF MACHINE LEARNING
Machine learning is a buzzword for today's technology, and it is growing very rapidly day by day. We
are using machine learning in our daily life even without knowing it such as Google Maps, Google
assistant, Alexa, etc. Below are some most trending real-world applications of Machine Learning:
1. Image Recognition: Image recognition is one of the most common applications of machine
learning. It is used to identify objects, persons, places, digital images, etc. The popular use case of
image recognition and face detection is, Automatic friend tagging suggestion:
2. Speech Recognition: Speech recognition is a process of converting voice instructions into text,
and it is also known as "Speech to text", or "Computer speech recognition." At present, machine
learning algorithms are widely used by various applications of speech recognition. Google
assistant, Siri, Cortana, and Alexa are using speech recognition technology to follow the voice
instructions.
3. Traffic prediction: If we want to visit a new place, we take help of Google Maps, which shows us
the correct path with the shortest route and predicts the traffic conditions. It predicts the traffic
conditions such as whether traffic is cleared, slow-moving, or heavily congested with the help of two
ways:
➢ Real Time location of the vehicle form Google Map app and sensors
➢ Average time has taken on past days at the same time.
, 4. Product recommendations: Machine learning is widely used by various e-commerce and
entertainment companies such as Amazon, Netflix, etc., for product recommendation to the user.
Whenever we search for some product on Amazon, then we started getting an advertisement for the
same product while internet surfing on the same browser and this is because of machine learning.
5. Self-driving cars: One of the most exciting applications of machine learning is self-driving cars.
Machine learning plays a significant role in self-driving cars. Tesla, the most popular car
manufacturing company is working on self-driving car. It is using unsupervised learning method to
train the car models to detect people and objects while driving.
6. Email Spam and Malware Filtering: Whenever we receive a new email, it is filtered
automatically as important, normal, and spam. We always receive an important mail in our inbox
with the important symbol and spam emails in our spam box, and the technology behind this is
Machine learning.
7. Virtual Personal Assistant: We have various virtual personal assistants such as Google
assistant, Alexa, Cortana, Siri. As the name suggests, they help us in finding the information using
our voice instruction. These assistants can help us in various ways just by our voice instructions such
as Play music, call someone, open an email, Scheduling an appointment, etc.
8. Online Fraud Detection: Machine learning is making our online transaction safe and secure by
detecting fraud transaction. Whenever we perform some online transaction, there may be various
ways that a fraudulent transaction can take place such as fake accounts, fake ids, and steal money in
the middle of a transaction. So, to detect this, Feed Forward Neural network helps us by checking
whether it is a genuine transaction or a fraud transaction.
9. Stock Market trading: Machine learning is widely used in stock market trading. In the stock
market, there is always a risk of up and downs in shares, so for this machine learning's long short-
term memory neural network is used for the prediction of stock market trends.
10. Automatic Language Translation: Nowadays, if we visit a new place and we are not aware of
the language then it is not a problem at all, as for this also machine learning helps us by converting
the text into our known languages. Google's GNMT (Google Neural Machine Translation) provide
this feature, which is a Neural Machine Learning that translates the text into our familiar language,
and it called as automatic translation.
SUPERVISED LEARNING
Supervised learning is the types of machine learning in which machines are trained using well
"labelled" training data, and on basis of that data, machines predict the output. The labelled data
means some input data is already tagged with the correct output.
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).