Question: 11. Write a program (matlab/python) to implement the Support Vector Machine algorithm. Train an SVM classifer with data from w3 and w4 in the following

11. Write a program (matlab/python) to implement the Support Vector Machine algorithm. Train an SVM classifer with data from w3 and w4 in the following way. Preprocess each training pattern to form a new vector having components 1, x1, x2, x1^2, x1.x2, x2^2. and

(a) Train your classifier with just the first patterns in w3, and w4 and find the separating hyperplane and the margin.

(b) Repeat part (a) using the first two points in the two categories (four points total). What is the equation of the separating hyperplane, the margin, and the support vectors?

(c) Repeat part (b) with the first three points in each category (six points total), the first four points, and so on, until the transformed patterns cannot be linearly separated in the transformed space.

DATA:

w3: x1=[-3.0,0.5,2.9,-0.1,-4.0,-1.3,-3.4,-4.1,-5.1,1.9]

w3: x2=[-2.9,8.7,2.1,5.2,2.2,3.7,6.2,3.4,1.6,5.1]

w4: x1=[-2.0,-8.9,-4.2,-8.5,-6.7,-0.5,-5.3,-8.7,-7.1,-8.0]

w4: x2=[-8.4,0.2,-7.7,-3.2,-4.0,-9.2,-6.7,-6.4,-9.7,-6.3]

Note: Question from pattern classification 2nd edition. Chapter 5 Computer Problem 11.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!