0% found this document useful (0 votes)
12 views20 pages

Ch2 - Lec1 - Supervised Learning

Uploaded by

Alemayehu Guta
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)
12 views20 pages

Ch2 - Lec1 - Supervised Learning

Uploaded by

Alemayehu Guta
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/ 20

Introduction to Machine Learning

Ch2_Lec1_Supervised Learning

1
By Kassahun Tamir
Outline
 Frame of Supervised Machine Learning
 Working of Supervised Learning
 Steps involved in Supervised Learning
 Types of Supervised Machine Learning
 Evaluating Supervised Learning Models
 Advantages and Disadvantages of Supervised Learning
 Applications of Supervised Learning

By Kassahun Tamir 2
Framework of Supervised Machine Learning

 Training: given a training set of labeled examples {(x1,y1), …,


(xN,yN)}, estimate the prediction function f by minimizing the
prediction error on the training set.
 Testing: apply f to a never before seen test example x and output the
predicted value y = f(x).
By Kassahun Tamir 3
Supervised Learning
 Supervised learning is a category of machine learning that uses labeled
datasets to train algorithms to predict outcomes and recognize patterns.
 The training data is processed, building a function that maps new data on
expected output values.

 The machine then learns to predict the output for new input data.
Supervised learning is often used for tasks such as classification,
regression, and object detection.

By Kassahun Tamir 4
Supervised Learning
 Supervised learning is a type of machine learning algorithm that learns
from labeled data. Labeled data is data that has been tagged with a
correct answer or classification.
 Supervised learning, as the name indicates, has the presence of a
supervisor as a teacher. Supervised learning is when we teach or train
the machine using data that is well-labelled. Which means some data is
already tagged with the correct answer. After that, the machine is provided
with a new set of examples(data) so that the supervised learning algorithm
analyses the training data(set of training examples) and produces a correct
outcome from labeled data.

By Kassahun Tamir 5
Supervised Learning

By Kassahun Tamir 6
Working of Supervised Machine Learning

 While training of a supervised machine learning algorithm, the system


encounters massive amount of data to predict some output at each
specific value of inputs.
 In layman terms, it tries to find a pattern or relation with the input and
output values.
 After training, the trained machine learning algorithm is verified with the
testing dataset, which verifies the efficiency of result or measure the
accuracy of the algorithm

By Kassahun Tamir 7
Steps Involved in Supervised Machine Learning

Step 1: Determining the datatype of datasets.

Step 2: Collecting the labeled datasets.

Step 3: Splitting-up the collected dataset into training dataset, testing


dataset, and validation dataset.

Step 4: Determining the input variables for training datasets, and these
input variables should have enough information, so that the built model
can accurately predict the targeted attributes or output.
By Kassahun Tamir 8
Steps Involved in Supervised Machine Learning

Step 5: Determining the suitable machine learning prediction model or


algorithm such as Linear regression, polynomial regression, or support
vector machine.

Step 6: Machine learning model execution on training datasets with


validation sets as control parameters, which are the subset of collected
datasets.

Step 7: Introduction of Evaluation metrices, which tells us about the


accuracy of machine learning model by providing the output values of
testing dataset. If the model ‘output values are predicted correctly then the
model is declared as an accurate model.
By Kassahun Tamir 9
Types of Supervised Machine Learning

By Kassahun Tamir 10
Types of Supervised Machine Learning

 Regression

Regression is a type of supervised learning that is used to predict


continuous values, such as house prices, stock prices, or customer churn.
Regression algorithms learn a function that maps from the input features to
the output value.

By Kassahun Tamir 11
Types of Supervised Machine Learning

 Classification

Classification is a type of supervised learning that is used to predict


categorical values, such as whether a customer will churn or not, whether an
email is spam or not, or whether a medical image shows a tumor or not.
Classification algorithms learn a function that maps from the input features to
a probability distribution over the output classes.

By Kassahun Tamir 12
Types of Supervised Machine Learning

 Assign input vector to one of two or more classes


 Any decision rule divides input space into decision regions separated
by decision boundaries

By Kassahun Tamir 13
Evaluating Supervised Learning Models

 For Regression
 Mean Squared Error (MSE): MSE measures the average squared
difference between the predicted values and the actual values. Lower MSE
values indicate better model performance.
 Root Mean Squared Error (RMSE): RMSE is the square root of MSE,
representing the standard deviation of the prediction errors. Similar to
MSE, lower RMSE values indicate better model performance.

By Kassahun Tamir 14
Evaluating Supervised Learning Models

 Mean Absolute Error (MAE): MAE measures the average absolute


difference between the predicted values and the actual values. It is less
sensitive to outliers compared to MSE or RMSE.
 R-squared (Coefficient of Determination): R-squared measures the
proportion of the variance in the target variable that is explained by the
model. Higher R-squared values indicate better model fit.
 For Classification
 Accuracy: Accuracy is the percentage of predictions that the model
makes correctly. It is calculated by dividing the number of correct
predictions by the total number of predictions.

By Kassahun Tamir 15
Evaluating Supervised Learning Models

 Precision: Precision is the percentage of positive predictions that the model


makes that are actually correct. It is calculated by dividing the number of true
positives by the total number of positive predictions.
 Recall: Recall is the percentage of all positive examples that the model
correctly identifies. It is calculated by dividing the number of true positives by
the total number of positive examples.
 F1 score: The F1 score is a weighted average of precision and recall. It is
calculated by taking the harmonic mean of precision and recall.
 Confusion matrix: A confusion matrix is a table that shows the number of
predictions for each class, along with the actual class labels. It can be used to
visualize the performance of the model and identify areas where the model is
struggling.

By Kassahun Tamir 16
Advantages of Supervised learning

 Supervised learning allows collecting data and produces data output from
previous experiences.
 Helps to optimize performance criteria with the help of experience.
 Supervised machine learning helps to solve various types of real-world
computation problems.
 It performs classification and regression tasks.
 It allows estimating or mapping the result to a new sample.
 We have complete control over choosing the number of classes we want in
the training data.

By Kassahun Tamir 17
Disadvantages of Supervised learning

 Classifying big data can be challenging.


 Training for supervised learning needs a lot of computation time. So, it
requires a lot of time.
 Supervised learning cannot handle all complex tasks in Machine Learning.
 Computation time is vast for supervised learning.
 It requires a labelled data set.
 It requires a training process.

By Kassahun Tamir 18
Applications of Supervised Learning

 Spam Detection
 Sales Forecasting
 House-Price Predictions
 Handwriting Detection
 Speech-Recognition
 Object Recognition
 Bio-Informatics
 Fraud Detection

By Kassahun Tamir 19
Questions?

By Kassahun Tamir 20

You might also like