0% found this document useful (0 votes)
19 views14 pages

8-Module 5 Linear and Logical Regression-18-03-2024

The document discusses supervised machine learning, describing how it uses labeled training data to train models to predict outputs. It covers regression and classification algorithms, the steps involved in supervised learning, and provides examples of applying supervised learning to problems like spam filtering and shape recognition.

Uploaded by

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

8-Module 5 Linear and Logical Regression-18-03-2024

The document discusses supervised machine learning, describing how it uses labeled training data to train models to predict outputs. It covers regression and classification algorithms, the steps involved in supervised learning, and provides examples of applying supervised learning to problems like spam filtering and shape recognition.

Uploaded by

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

Supervised Machine

Learning
Module 5
MACHINE LEARNING
Supervised learning
• 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.
• The training data provided to the machines work as the supervisor that
teaches the machines to predict the output correctly. It applies the same
concept as a student learns in the supervision of the teacher.
• 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 the real-world, supervised learning can be used for Risk Assessment,
Image classification, Fraud Detection, spam filtering, etc.
How Supervised
Learning Works?
• In supervised learning, models are
trained using labelled dataset,
where the model learns about each
type of data.
• Once the training process is
completed, the model is tested on
the basis of test data (a subset of the
training set), and then it predicts
the output.
How Supervised
Learning Works?
• Suppose we have a dataset of different types of
shapes which includes square, rectangle, triangle,
and Polygon. Now the first step is that we need to
train the model for each shape.
• If the given shape has four sides, and all the sides are
equal, then it will be labelled as a Square.
• If the given shape has three sides, then it will be labelled
as a triangle.
• If the given shape has six equal sides then it will be
labelled as hexagon.
• Now, after training, we test our model using the
test set, and the task of the model is to identify the
shape.
• 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.
Steps Involved in Supervised
Learning:
• First Determine the type of training dataset
• Collect/Gather the labelled training data.
• Split the training dataset into training dataset, test dataset, and validation dataset.
• Determine the input features of the training dataset, which should have enough
knowledge so that the model can accurately predict the output.
• Determine the suitable algorithm for the model, such as support vector machine,
decision tree, etc.
• Execute the algorithm on the training dataset. Sometimes we need validation sets as
the control parameters, which are the subset of training datasets.
• Evaluate the accuracy of the model by providing the test set. If the model predicts the
correct output, which means our model is accurate.
Types of supervised Machine learning
Algorithms: (Two Types)
1. Regression
Regression algorithms are used if there is a relationship
between the input variable and the output variable. It is used
for the prediction of continuous variables, such as Weather
forecasting, Market Trends, etc. Below are some popular
Regression algorithms which come under supervised learning:
• Linear Regression
• Regression Trees
• Non-Linear Regression
• Bayesian Linear Regression
• Polynomial Regression
Types of supervised Machine learning
Algorithms: (Two Types)
2. Classification
Classification algorithms are used when the output variable
is categorical, which means there are two classes such as
Yes-No, Male-Female, True-false, etc.
• Spam Filtering,
• Random Forest
• Decision Trees
• Logistic Regression
• Support vector Machines
Advantages and Disadvantages 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.
• Supervised learning model helps us to solve various real-world problems such as fraud
detection, spam filtering, etc.
• 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.
Regression vs. Classification in Machine
Learning
• Both the algorithms are used for prediction
in Machine learning and work with the
labeled datasets. But the difference
between both is how they are used for
different machine learning problems.
• Regression algorithms are used to predict
the continuous values such as price, salary,
age, etc.
• Classification algorithms are used to
predict/Classify the discrete values such as
Male or Female, True or False, Spam or Not
Spam, etc.
Classification in Machine Learning
It is a process of finding a function which helps
in dividing the dataset into classes based on
different parameters. In Classification, a
computer program is trained on the training
dataset and based on that training, it categorizes
the data into different classes.
The task of the classification algorithm is to find
the mapping function to map the input(x) to the
discrete output(y).

Example: The best example to understand the Classification problem is Email Spam Detection.
The model is trained on the basis of millions of emails on different parameters, and whenever it
receives a new email, it identifies whether the email is spam or not. If the email is spam, then it
is moved to the Spam folder.
Classification in Machine Learning
Types of ML Classification Algorithms:
Classification Algorithms can be further divided
into the following types:
• Logistic Regression
• K-Nearest Neighbours
• Support Vector Machines
• Kernel SVM
• Naïve Bayes
• Decision Tree Classification
• Random Forest Classification
Prediction of pizza pricing with Linear regression

You might also like