SVM FOR GRADE 11 pearson Btec 3rd level.ppt

abigailjudith8 28 views 20 slides Oct 14, 2024
Slide 1
Slide 1 of 20
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20

About This Presentation

SVM FOR GRADE 11 pearson Btec 3rd level


Slide Content

Support Vector Machine Classification , Regression and Outliers detection

OBJECTIVES Understand the use of SVM algorithm. Demonstrate and interpret SVM using necessary implementation.

Introduction SVM A Support Vector Machine (SVM) is a discriminative classifier which intakes training data (supervised learning), the algorithm outputs an optimal hyperplane which categorizes new examples.

What could be drawn to classify the black dots from blue squares?

A line drawn between these data points classify the black dots and blue squares. Linearly separable data

Linear vs Nonlinear separable data

What could be drawn to classify these data points ( red dots from blue stars )? NonLinearly separable data

Here the hyperplane is a 2d plane drawn parallel to x- axis that is the separator. NonLinearly separable data

Non Linear data ( type 2 ) Raw Data Line as Hyperplane

For the previous data the line , if used as a Hyperplane Two black dots also fall in category of blue squares Data separation is not perfect It tolerates some outliers in the classification

This type of separator best provides the classification. But It is quite difficult to train a model like this . This is termed as Regularisation parameter.

Margin Margin is the perpendicular distance between the closest data points and the Hyperplane ( on both sides ) The best optimised line ( hyperplane ) with maximum margin is termed as Margin Maximal Hyperplane. The closest points where the margin distance is calculated are considered as the support vectors.

Tuning Parameters SVM 1. Kernel

Kernel Choosing the Right Kernel Linear Kernel: Use it when the data is linearly separable, or when you have a large number of features compared to the number of data points. Polynomial Kernel: Use it for data that exhibits a polynomial relationship between features. RBF Kernel: Use it when there is no clear linear relationship, and the data seems more complex. This is often the default choice if you're unsure.

KERNEL

Hyperplane 1. Hyperplane: A hyperplane is essentially a decision boundary that separates two classes of data. In two-dimensional space, it is simply a line, and in three-dimensional space, it’s a plane. For higher dimensions, it is still called a hyperplane. 2. Margin: The margin refers to the distance between the hyperplane and the closest data points of each class (one on each side of the hyperplane). The goal of an SVM is to find the maximum margin , i.e., the hyperplane that leaves the greatest possible distance between itself and the closest points from either class. This results in a clearer and more reliable separation of the two classes.

3. Support Vectors: The support vectors are the data points closest to the hyperplane, and these are critical because they define the margin. The margin is calculated based on the distance from these points to the hyperplane. These points lie right on the boundary of the margin (on either side), and even if you removed all other points, the position of the hyperplane would remain the same, as it's entirely determined by these support vectors. 4. Margin Maximal Hyperplane: The best-optimized hyperplane is called the Margin Maximal Hyperplane because it maximizes the margin, meaning it tries to position itself as far away as possible from the closest data points of both classes. This reduces the likelihood of misclassifying new data points, as the separation is as clear and wide as possible.

Applications : Face detection Text and hypertext categorization Classification of images Bioinformatics Handwriting recognition Protein fold and remote homology detection Generalized predictive control(GPC)
Tags