logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Given a dataset of two positive points (red points): [6, 2]T , [6, 4]T

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

If you have any questions, please contact me.

Q1 Given a dataset of two positive points (red points): [6, 2]T , [6, 4]T , and two negative points (green points): [2, 4]T , [3, 6]T , as shown in figure below, the problem of a linearly separable SVM can be formulated as the following form:

 minx

 1 xT Qx + pT x 2

 subject to Gx ≤ h (1)

Write down the values of Q, p, G, and h.

Q2 Modify the provided example code “example-code.py” to solve the linearly separable SVM problem in Q1 and output the following values:

1. The values of w and b that decide the separating line w.x + b = 0.

2. The margin size.

3. The support vectors.

4. Predict the class labels of the points:

[3, 5]T , [3, 4]T , [4, 6]T , [5, 4]T , [5, 2]T , [5, 6]T .

 

Q3 Given a dataset of three positive points (red points): [3, 5]T , [5, 3]T , [6, 6]T , and two negative points (green points): [5, 6]T , [6, 5]T , as shown in figure below, the problem of a linearly non-separable SVM can be formulated as the following form:

 

 

minx

 

 

1 xT Qx + pT x 2

 

subject to Gx ≤ h (2)

Write down the values of Q, p, G, and h.

 

 

 

Q4 Set the trade-off parameter C = 1. Modify the provided example code “example-code.py” to solve the

linearly non-separable SVM problem in Q3 and output the following values:

1. The values of w and b that decide the separating line w.x + b = 0.

2. The margin size.

3. The support vectors.

4. Predict the class labels of the points:

[3, 4]T , [3, 6]T , [4, 3]T , [4, 5]T , [5, 4]T , [5, 2]T , [5, 6]T , [6, 4]T , [6, 7]T , [7, 5]T , [7, 6]T .

Q5 Set the trade-off parameter C = 1000. Use the same dataset in Q3 and the basis functions ϕ(x) = [x1, x2, x2, x2, x1 • x2]T , where x = [x1, x2]T . Further modify the code implemented for Q4 to train

a nonlinear SVM model and output the following values:

1. The values of w and b that decide the separating line w.ϕ(x) + b = 0.

2. The margin size.

3. The support vectors.

4. Predict the class labels of the points:

[3, 4]T , [3, 6]T , [4, 3]T , [4, 5]T , [5, 4]T , [5, 2]T , [5, 6]T , [6, 4]T , [6, 7]T , [7, 5]T , [7, 6]T .

 

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Atharva PatilComputer science

617 Answers

Hire Me
expert
Chrisantus MakokhaComputer science

686 Answers

Hire Me
expert
AyooluwaEducation

862 Answers

Hire Me
expert
RIZWANAMathematics

661 Answers

Hire Me

Get Free Quote!

386 Experts Online