SlideShare a Scribd company logo
NADAR SARASWATHI
COLLEGE OF ARTS
AND SCIENCE
SUBJECT: ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
TOPIC: SUPPORT VECTOR MACHINES(SVM),
NAÏVE BAYES CLASSIFICATION
R. Girisakthi
II M.Sc Computer science
SUPPORT VECTOR MACHINE(SVM)
ALGORITHM
 Support Vector Machine (SVM) is a supervised
machine learning algorithm used for
classification and regression tasks. While it can
handle regression problems, SVM is
particularly well-suited for classification tasks.
 SVM aims to find the optimal hyper plane in
an N-dimensional space to separate data points
into different classes. The algorithm maximizes
the margin between the closest points of
different classes
SUPPORT VECTOR MACHINE(SVM)
TERMINOLOGY
 Hyperplane: A decision boundary separating different
classes in feature space, represented by the
equation wx + b = 0 in linear classification.
 Support Vectors: The closest data points to the
hyperplane, crucial for determining the hyperplane and
margin in SVM.
 Margin: The distance between the hyperplane and the
support vectors. SVM aims to maximize this margin
for better classification performance.
 Kernel: A function that maps data to a higher-
dimensional space, enabling SVM to handle non-
linearly separable data.
 Hard Margin: A maximum-margin hyperplane that
perfectly separates the data without misclassifications.
 Soft Margin: Allows some misclassifications by
introducing slack variables, balancing margin
maximization and misclassification penalties when data
is not perfectly separable.
 C: A regularization term balancing margin
maximization and misclassification penalties. A higher
C value enforces a stricter penalty for
misclassifications.
 Hinge Loss: A loss function penalizing misclassified
points or margin violations, combined with
regularization in SVM.
 Dual Problem: Involves solving for Lagrange
multipliers associated with support vectors, facilitating
the kernel trick and efficient computation.
SUPPORT VECTOR MACHINE(SVM)
ALGORITHM WORK
 The key idea behind the SVM algorithm is to find the
hyperplane that best separates two classes by
maximizing the margin between them. This margin is
the distance from the hyperplane to the nearest data
points (support vectors) on each side.
 The best hyperplane, also known as the “hard
margin,” is the one that maximizes the distance
between the hyperplane and the nearest data points
from both classes. This ensures a clear separation
between the classes. So, from the above figure, we
choose L2 as hard margin.
MATHEMATICAL
COMPUTATION(SVM)
Consider a binary classification problem with two classes,
labeled as +1 and -1. We have a training dataset consisting of
input feature vectors X and their corresponding class labels Y.
The equation for the linear hyperplane can be written as:
wTx+b=0
Where:
 ww is the normal vector to the hyperplane (the direction
perpendicular to it).
 bb is the offset or bias term, representing the distance of the
hyperplane from the origin along the normal vector ww.
NAÏVE BAYES CLASSIFICATION
 Naive Bayes classifiers are supervised machine
learning algorithms used for classification tasks, based
on Bayes’ Theorem to find probabilities. This article
will give you an overview as well as more advanced
use and implementation of Naive Bayes in machine
learning.
Key Features of Naive Bayes Classifiers
 The main idea behind the Naive Bayes classifier is to
use Bayes’ Theorem to classify data based on the
probabilities of different classes given the features of
the data. It is used mostly in high-dimensional text
classification
 The Naive Bayes Classifier is a simple probabilistic
classifier and it has very few number of parameters
which are used to build the ML models that can predict
at a faster speed than other classification algorithms.
 It is a probabilistic classifier because it assumes that
one feature in the model is independent of existence of
another feature. In other words, each feature
contributes to the predictions with no relation between
each other.
 Naïve Bayes Algorithm is used in spam filtration,
Sentimental analysis, classifying articles and many
more
UNDERSTANDING BAYES’ THEOREM
FOR NAÏVE BAYES
 Bayes’ Theorem finds the probability of an event
occurring given the probability of another event that has
already occurred.
Bayes’ theorem is stated mathematically as the following
equation:
P(y X)=P(X y)P(y)P(X)
∣ ∣ P(y∣X)=P(X)P(X∣y)P(y)
​
where A and B are events and P(B) ≠ 0
Where,
 P(A|B) is Posterior probability: Probability of hypothesis A on
the observed event B.
 P(B|A) is Likelihood probability: Probability of the evidence
given that the probability of a hypothesis is true.X=(x1,x2,x3,
……,xn)
Artificial Intelligence and Machine Learning
ADVANTAGES OF NAÏVE BAYES CLASSIFIER:
 Easy to implement and computationally efficient.
 Effective in cases with a large number of features.
 Performs well even with limited training data.
 It performs well in the presence of categorical features.
 For numerical features data is assumed to come from
normal distributions
DISADVANTAGES OF NAÏVE BAYES CLASSIFIER:
 Assumes that features are independent, which may not
always hold in real-world data.
 Can be influenced by irrelevant attributes.
 May assign zero probability to unseen events, leading
to poor generalization.
THANK YOU

More Related Content

DOC
Introduction to Support Vector Machines
PPT
Support Vector Machines
PDF
Regression analysis and its type
PPTX
MACHINE LEARNING Unit -2 Algorithm.pptx
PPTX
support vector machine and associative classification
PPTX
SVM - Functional Verification
DOC
SVM Tutorial
DOC
SVM Tutorial
Introduction to Support Vector Machines
Support Vector Machines
Regression analysis and its type
MACHINE LEARNING Unit -2 Algorithm.pptx
support vector machine and associative classification
SVM - Functional Verification
SVM Tutorial
SVM Tutorial

Similar to Artificial Intelligence and Machine Learning (20)

PPTX
Support vector machine-SVM's
PPTX
SVM[Support vector Machine] Machine learning
PDF
Classifiers
PDF
Km2417821785
PPTX
Introduction to Machine Learning Elective Course
PPT
Winnow vs perceptron
PPTX
classification algorithms in machine learning.pptx
PPTX
Introduction to Machine Learning Concepts
PPTX
Predictive analytics using 'R' Programming
PPTX
Machine learning session8(svm nlp)
PDF
Generalization of linear and non-linear support vector machine in multiple fi...
PPT
PERFORMANCE EVALUATION PARAMETERS FOR MACHINE LEARNING
PPTX
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
PPTX
Linear Algebra.pptx Presentation for GenAI
PPTX
Lec_XX_Support Vector Machine Algorithm.pptx
DOCX
introduction to machine learning unit iv
PDF
Support vector machines
PDF
A FUZZY INTERACTIVE BI-OBJECTIVE MODEL FOR SVM TO IDENTIFY THE BEST COMPROMIS...
PDF
A Fuzzy Interactive BI-objective Model for SVM to Identify the Best Compromis...
PPT
Lecture 2
Support vector machine-SVM's
SVM[Support vector Machine] Machine learning
Classifiers
Km2417821785
Introduction to Machine Learning Elective Course
Winnow vs perceptron
classification algorithms in machine learning.pptx
Introduction to Machine Learning Concepts
Predictive analytics using 'R' Programming
Machine learning session8(svm nlp)
Generalization of linear and non-linear support vector machine in multiple fi...
PERFORMANCE EVALUATION PARAMETERS FOR MACHINE LEARNING
Support Vector Machines USING MACHINE LEARNING HOW IT WORKS
Linear Algebra.pptx Presentation for GenAI
Lec_XX_Support Vector Machine Algorithm.pptx
introduction to machine learning unit iv
Support vector machines
A FUZZY INTERACTIVE BI-OBJECTIVE MODEL FOR SVM TO IDENTIFY THE BEST COMPROMIS...
A Fuzzy Interactive BI-objective Model for SVM to Identify the Best Compromis...
Lecture 2
Ad

Recently uploaded (20)

PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Lesson notes of climatology university.
PDF
Classroom Observation Tools for Teachers
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Computing-Curriculum for Schools in Ghana
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
master seminar digital applications in india
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Complications of Minimal Access Surgery at WLH
PPTX
Cell Structure & Organelles in detailed.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Lesson notes of climatology university.
Classroom Observation Tools for Teachers
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Chinmaya Tiranga quiz Grand Finale.pdf
Final Presentation General Medicine 03-08-2024.pptx
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Institutional Correction lecture only . . .
Computing-Curriculum for Schools in Ghana
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
master seminar digital applications in india
Abdominal Access Techniques with Prof. Dr. R K Mishra
01-Introduction-to-Information-Management.pdf
Pharma ospi slides which help in ospi learning
Microbial disease of the cardiovascular and lymphatic systems
Complications of Minimal Access Surgery at WLH
Cell Structure & Organelles in detailed.
STATICS OF THE RIGID BODIES Hibbelers.pdf
Microbial diseases, their pathogenesis and prophylaxis
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Ad

Artificial Intelligence and Machine Learning

  • 1. NADAR SARASWATHI COLLEGE OF ARTS AND SCIENCE SUBJECT: ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING TOPIC: SUPPORT VECTOR MACHINES(SVM), NAÏVE BAYES CLASSIFICATION R. Girisakthi II M.Sc Computer science
  • 2. SUPPORT VECTOR MACHINE(SVM) ALGORITHM  Support Vector Machine (SVM) is a supervised machine learning algorithm used for classification and regression tasks. While it can handle regression problems, SVM is particularly well-suited for classification tasks.  SVM aims to find the optimal hyper plane in an N-dimensional space to separate data points into different classes. The algorithm maximizes the margin between the closest points of different classes
  • 3. SUPPORT VECTOR MACHINE(SVM) TERMINOLOGY  Hyperplane: A decision boundary separating different classes in feature space, represented by the equation wx + b = 0 in linear classification.  Support Vectors: The closest data points to the hyperplane, crucial for determining the hyperplane and margin in SVM.  Margin: The distance between the hyperplane and the support vectors. SVM aims to maximize this margin for better classification performance.  Kernel: A function that maps data to a higher- dimensional space, enabling SVM to handle non- linearly separable data.
  • 4.  Hard Margin: A maximum-margin hyperplane that perfectly separates the data without misclassifications.  Soft Margin: Allows some misclassifications by introducing slack variables, balancing margin maximization and misclassification penalties when data is not perfectly separable.  C: A regularization term balancing margin maximization and misclassification penalties. A higher C value enforces a stricter penalty for misclassifications.  Hinge Loss: A loss function penalizing misclassified points or margin violations, combined with regularization in SVM.  Dual Problem: Involves solving for Lagrange multipliers associated with support vectors, facilitating the kernel trick and efficient computation.
  • 5. SUPPORT VECTOR MACHINE(SVM) ALGORITHM WORK  The key idea behind the SVM algorithm is to find the hyperplane that best separates two classes by maximizing the margin between them. This margin is the distance from the hyperplane to the nearest data points (support vectors) on each side.
  • 6.  The best hyperplane, also known as the “hard margin,” is the one that maximizes the distance between the hyperplane and the nearest data points from both classes. This ensures a clear separation between the classes. So, from the above figure, we choose L2 as hard margin.
  • 7. MATHEMATICAL COMPUTATION(SVM) Consider a binary classification problem with two classes, labeled as +1 and -1. We have a training dataset consisting of input feature vectors X and their corresponding class labels Y. The equation for the linear hyperplane can be written as: wTx+b=0 Where:  ww is the normal vector to the hyperplane (the direction perpendicular to it).  bb is the offset or bias term, representing the distance of the hyperplane from the origin along the normal vector ww.
  • 8. NAÏVE BAYES CLASSIFICATION  Naive Bayes classifiers are supervised machine learning algorithms used for classification tasks, based on Bayes’ Theorem to find probabilities. This article will give you an overview as well as more advanced use and implementation of Naive Bayes in machine learning. Key Features of Naive Bayes Classifiers  The main idea behind the Naive Bayes classifier is to use Bayes’ Theorem to classify data based on the probabilities of different classes given the features of the data. It is used mostly in high-dimensional text classification
  • 9.  The Naive Bayes Classifier is a simple probabilistic classifier and it has very few number of parameters which are used to build the ML models that can predict at a faster speed than other classification algorithms.  It is a probabilistic classifier because it assumes that one feature in the model is independent of existence of another feature. In other words, each feature contributes to the predictions with no relation between each other.  Naïve Bayes Algorithm is used in spam filtration, Sentimental analysis, classifying articles and many more
  • 10. UNDERSTANDING BAYES’ THEOREM FOR NAÏVE BAYES  Bayes’ Theorem finds the probability of an event occurring given the probability of another event that has already occurred. Bayes’ theorem is stated mathematically as the following equation: P(y X)=P(X y)P(y)P(X) ∣ ∣ P(y∣X)=P(X)P(X∣y)P(y) ​ where A and B are events and P(B) ≠ 0 Where,  P(A|B) is Posterior probability: Probability of hypothesis A on the observed event B.  P(B|A) is Likelihood probability: Probability of the evidence given that the probability of a hypothesis is true.X=(x1,x2,x3, ……,xn)
  • 12. ADVANTAGES OF NAÏVE BAYES CLASSIFIER:  Easy to implement and computationally efficient.  Effective in cases with a large number of features.  Performs well even with limited training data.  It performs well in the presence of categorical features.  For numerical features data is assumed to come from normal distributions DISADVANTAGES OF NAÏVE BAYES CLASSIFIER:  Assumes that features are independent, which may not always hold in real-world data.  Can be influenced by irrelevant attributes.  May assign zero probability to unseen events, leading to poor generalization.