SlideShare a Scribd company logo
Dr. Dalal AL-Alimi
• What Is Supervised learning ?
• Linear Regression.
• Regularized Regression
• Support Vector Machine
• Supervised learning is an area of machine learning where the chosen
algorithm tries to fit a target using the given input.
• A set of training data that contains labels is supplied to the algorithm.
Based on a massive set of data, the algorithm will learn a rule that it
uses to predict the labels for new observations.
• In other words, supervised learning algorithms are provided with
historical data and asked to find the relationship that has the best
predictive power.
• There are two varieties of supervised learning algorithms:
• Regression algorithms.
• Classification algorithms.
Introduction to Artificial Intelligence_ Lec 7
• Linear regression is a linear model, e.g., a model that assumes a linear relationship
between the input variables (x) and the single output variable (y).
• The goal of linear regression is to train a linear model to predict a new y given a
previously unseen x with as little error as possible.
• Our model will be a function that predicts y given x1, x2...xi:
• y = β0 + β1x1 + ... + βixi
• where, β0 is called intercept and β1...βi are the coefficient of the regression.
• The cost function for linear regression is the sum of squared residuals (RSS):
• In this equation, β0 is the intercept; βj represents the coefficient; β1, .., βj are the
coefficients of the regression; and xij represents the ith observation and jth variable.
Advantages and Disadvantages
• In terms of advantages, linear regression is easy to understand and interpret.
• It may not work well when there is a nonlinear relationship between predicted
and predictor variables.
• Linear regression is prone to overfitting and when a large number of features are
present, it may not handle irrelevant features well.
• Regularized Regression modifies Linear Regression by adding a
penalty to the coefficients to prevent overfitting. The two main types
are:
❖ Ridge Regression (L2 Regularization): Adds a penalty proportional to the sum of squared
coefficients (shrinks but does not remove features).
❖ Lasso Regression (L1 Regularization): Adds a penalty proportional to the absolute value of
coefficients (can shrink some coefficients to zero, performing feature selection).
• Logistic Regression is used for classification tasks, not regression. It predicts the
probability of a class using a logistic (sigmoid) function.
• Key Differences from Linear Regression:
• Output is a probability (between 0 and 1), not a continuous value.
• Uses the sigmoid function to map predictions to probabilities.
• Instead of minimizing squared errors, it minimizes log loss (cross-entropy loss).
• The objective of the support vector machine (SVM)
algorithm is to maximize the margin (shown as shaded
area in the Figure), which is defined as the distance
between the separating hyperplane (or decision boundary)
and the training samples that are closest to this
hyperplane, the so-called support vectors.
• The margin is calculated as the perpendicular distance
from the line to only the closest points, as shown in
Figure. Hence, SVM calculates a maximum-margin
boundary that leads to a homogeneous partition of all data
points.
• SVM is used for both classification and regression.
In terms of advantages,
• SVM is fairly robust against overfitting, especially in higher dimensional
space.
• It handles the nonlinear relationships quite well.
In terms of disadvantages,
• SVM can be inefficient to train and memory-intensive to run and tune.
• It doesn’t perform well with large datasets. It requires the feature scaling of the
data.
• What is the Supervised learning?
• What are the SVM Advantages and disadvantages?

More Related Content

PDF
Supervised Learning.pdf
PPTX
Unit 3 – AIML.pptx
PDF
Basics of Machine Learning
PPTX
Linear Regression for Data Mining Application
PDF
Module 5.pdf Machine Learning Types and examples
PPTX
Classification Algortyhm of Machine Learning
PDF
Introduction to machine learning
PPTX
AI & ML(Unit III).pptx.It contains also syllabus
Supervised Learning.pdf
Unit 3 – AIML.pptx
Basics of Machine Learning
Linear Regression for Data Mining Application
Module 5.pdf Machine Learning Types and examples
Classification Algortyhm of Machine Learning
Introduction to machine learning
AI & ML(Unit III).pptx.It contains also syllabus

Similar to Introduction to Artificial Intelligence_ Lec 7 (20)

PPTX
Introduction to machine learning and model building using linear regression
PDF
Machine Learning.pdf
PPTX
Supervised Machine Learning
PPTX
Ai saturdays presentation
PPTX
Machine Learning course Lecture number 4, Linear regression and variants.pptx
PPTX
UNIT II SUPERVISED LEARNING - Introduction
PPTX
Linear regression
PDF
Regression analysis and its type
PPTX
Introduction to Classification . pptx
PDF
Linear Regression
PDF
Lecture 2 neural network covers the basic
PPTX
Introduction to Machine Learning Elective Course
PDF
nber_slides.pdf
PPTX
Support Vector Machine
PDF
Machine learning Introduction
PDF
The normal presentation about linear regression in machine learning
PDF
working with python
PDF
Chapter3 hundred page machine learning
PDF
Course Title: Introduction to Machine Learning, Chapter 2- Supervised Learning
PPTX
Machine learning and linear regression programming
Introduction to machine learning and model building using linear regression
Machine Learning.pdf
Supervised Machine Learning
Ai saturdays presentation
Machine Learning course Lecture number 4, Linear regression and variants.pptx
UNIT II SUPERVISED LEARNING - Introduction
Linear regression
Regression analysis and its type
Introduction to Classification . pptx
Linear Regression
Lecture 2 neural network covers the basic
Introduction to Machine Learning Elective Course
nber_slides.pdf
Support Vector Machine
Machine learning Introduction
The normal presentation about linear regression in machine learning
working with python
Chapter3 hundred page machine learning
Course Title: Introduction to Machine Learning, Chapter 2- Supervised Learning
Machine learning and linear regression programming
Ad

More from Dalal2Ali (9)

PDF
Introduction to Artificial Intelligence_Lec 1
PDF
Introduction to Artificial Intelligence_ Lec 4
PDF
Introduction to Artificial Intelligence_ Lec 2
PDF
Introduction to Artificial Intelligence_ Lec 9
PDF
Introduction to Artificial Intelligence_ Lec 10
PDF
Introduction to Artificial Intelligence_ Lec 8
PDF
Introduction to Artificial Intelligence_ Lec 6
PDF
Introduction to Artificial Intelligence_ Lec 3
PDF
Introduction to Artificial Intelligence_ Lec 5
Introduction to Artificial Intelligence_Lec 1
Introduction to Artificial Intelligence_ Lec 4
Introduction to Artificial Intelligence_ Lec 2
Introduction to Artificial Intelligence_ Lec 9
Introduction to Artificial Intelligence_ Lec 10
Introduction to Artificial Intelligence_ Lec 8
Introduction to Artificial Intelligence_ Lec 6
Introduction to Artificial Intelligence_ Lec 3
Introduction to Artificial Intelligence_ Lec 5
Ad

Recently uploaded (20)

PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
PDF
.pdf is not working space design for the following data for the following dat...
PPTX
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
IB Computer Science - Internal Assessment.pptx
PDF
Mega Projects Data Mega Projects Data
PPTX
Qualitative Qantitative and Mixed Methods.pptx
PPTX
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
PPTX
1_Introduction to advance data techniques.pptx
PPTX
Acceptance and paychological effects of mandatory extra coach I classes.pptx
PPTX
Database Infoormation System (DBIS).pptx
PPT
ISS -ESG Data flows What is ESG and HowHow
PPTX
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
PPTX
Business Acumen Training GuidePresentation.pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
PPT
Reliability_Chapter_ presentation 1221.5784
PDF
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
PDF
Clinical guidelines as a resource for EBP(1).pdf
PPTX
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
The THESIS FINAL-DEFENSE-PRESENTATION.pptx
.pdf is not working space design for the following data for the following dat...
AI Strategy room jwfjksfksfjsjsjsjsjfsjfsj
Introduction-to-Cloud-ComputingFinal.pptx
IB Computer Science - Internal Assessment.pptx
Mega Projects Data Mega Projects Data
Qualitative Qantitative and Mixed Methods.pptx
Microsoft-Fabric-Unifying-Analytics-for-the-Modern-Enterprise Solution.pptx
1_Introduction to advance data techniques.pptx
Acceptance and paychological effects of mandatory extra coach I classes.pptx
Database Infoormation System (DBIS).pptx
ISS -ESG Data flows What is ESG and HowHow
advance b rammar.pptxfdgdfgdfsgdfgsdgfdfgdfgsdfgdfgdfg
Business Acumen Training GuidePresentation.pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
Reliability_Chapter_ presentation 1221.5784
168300704-gasification-ppt.pdfhghhhsjsjhsuxush
Clinical guidelines as a resource for EBP(1).pdf
Introduction to Basics of Ethical Hacking and Penetration Testing -Unit No. 1...

Introduction to Artificial Intelligence_ Lec 7

  • 2. • What Is Supervised learning ? • Linear Regression. • Regularized Regression • Support Vector Machine
  • 3. • Supervised learning is an area of machine learning where the chosen algorithm tries to fit a target using the given input. • A set of training data that contains labels is supplied to the algorithm. Based on a massive set of data, the algorithm will learn a rule that it uses to predict the labels for new observations. • In other words, supervised learning algorithms are provided with historical data and asked to find the relationship that has the best predictive power. • There are two varieties of supervised learning algorithms: • Regression algorithms. • Classification algorithms.
  • 5. • Linear regression is a linear model, e.g., a model that assumes a linear relationship between the input variables (x) and the single output variable (y). • The goal of linear regression is to train a linear model to predict a new y given a previously unseen x with as little error as possible. • Our model will be a function that predicts y given x1, x2...xi: • y = β0 + β1x1 + ... + βixi • where, β0 is called intercept and β1...βi are the coefficient of the regression.
  • 6. • The cost function for linear regression is the sum of squared residuals (RSS): • In this equation, β0 is the intercept; βj represents the coefficient; β1, .., βj are the coefficients of the regression; and xij represents the ith observation and jth variable.
  • 7. Advantages and Disadvantages • In terms of advantages, linear regression is easy to understand and interpret. • It may not work well when there is a nonlinear relationship between predicted and predictor variables. • Linear regression is prone to overfitting and when a large number of features are present, it may not handle irrelevant features well.
  • 8. • Regularized Regression modifies Linear Regression by adding a penalty to the coefficients to prevent overfitting. The two main types are: ❖ Ridge Regression (L2 Regularization): Adds a penalty proportional to the sum of squared coefficients (shrinks but does not remove features). ❖ Lasso Regression (L1 Regularization): Adds a penalty proportional to the absolute value of coefficients (can shrink some coefficients to zero, performing feature selection).
  • 9. • Logistic Regression is used for classification tasks, not regression. It predicts the probability of a class using a logistic (sigmoid) function. • Key Differences from Linear Regression: • Output is a probability (between 0 and 1), not a continuous value. • Uses the sigmoid function to map predictions to probabilities. • Instead of minimizing squared errors, it minimizes log loss (cross-entropy loss).
  • 10. • The objective of the support vector machine (SVM) algorithm is to maximize the margin (shown as shaded area in the Figure), which is defined as the distance between the separating hyperplane (or decision boundary) and the training samples that are closest to this hyperplane, the so-called support vectors. • The margin is calculated as the perpendicular distance from the line to only the closest points, as shown in Figure. Hence, SVM calculates a maximum-margin boundary that leads to a homogeneous partition of all data points.
  • 11. • SVM is used for both classification and regression.
  • 12. In terms of advantages, • SVM is fairly robust against overfitting, especially in higher dimensional space. • It handles the nonlinear relationships quite well. In terms of disadvantages, • SVM can be inefficient to train and memory-intensive to run and tune. • It doesn’t perform well with large datasets. It requires the feature scaling of the data.
  • 13. • What is the Supervised learning? • What are the SVM Advantages and disadvantages?