Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

TASK - 1 ( Calculation of the Hyperplane, Margin planes and Maximum Margin Value, using Support Vector Machines SVM ) Consider two sets of 2

TASK-1(Calculation of the Hyperplane, Margin planes and Maximum Margin Value, using Support Vector Machines SVM)
Consider two sets of 2D data points, "negative" class AA, and "positive" class BB, given by the following MATLAB commands:
AA=[5,16; 6,12; 16,14; 13,6; 15,8; 10,15; 9,8; 13,13; 9,19; 13,18];
BB=[-5,1; -2,4; -2,0; -1,2; -6,5; -4,3; -6,-1; -10,4; -7,3; -9,0];
In order to avoid making a mistake with the transfer of the data (for example, missing a sign), it is recommended to use the "cut-and-paste" method.
For these two sets, design MATLAB script, which should be able to:
* clearly show on the plot your data and selected Support Vectors, marked with different colors for "positive" and "negative" classes;
* calculate the equation for the Hyperplane (for selected Support Vectors) and plot the Hyperplane on the same figure;
* calculate the Negative Margin Plane (Line) and plot it on the same figure;
* calculate the Maximum Margin Plane (Line) and plot it on the same figure;
* calculate the maximum margin value "m". Template of the resulting plot is presented in the illustration Figure.
TO DEMONSTRATE YOUR SOLUTION, enter your answers in three answer windows below the illustration Figure:
(1) In the FIRST answer window below ENTER your calculated SCALED coefficients "a","b" and "c" for the hyperplane equation of the format ax+by+c=0.
Note: your entered answer should have a strict specific format: having SEMICOLON (;) AFTER each MATLAB statement AND SPACE; but WITHOUT ANY other SPACES; use SMALL letters "a","b" and "c" for the coefficients of the hyperplane. Round their values and enter values with FOUR DIGITS after the dot. Enter all four digits after the dot, even if the last digits are given with zeros. For example, for the demo in Consultation Notes, the answers for "a","b" and "c" should be in the format:
a=0.2500; b=-0.2500; c=-0.7500;
I repeat myself: for quick marking, pls, follow this template, but enter YOUR OWN CALCULATED numbers for the "a","b" and "c" matrix.
IMPORTANT: your results will depend upon selection of the Support Vectors. In some cases, calculations of the Hyperplane should be repeated for a FEW DIFFERENT selections of Support Vectors to determine the unique set, resulting in the MAXIMUM MARGIN (out of all MAXIMUM MARGINS for the considered few cases with different sets of Support Vectors).
(2) In the SECOND answer window ENTER your solution for "m"- the MAXIMUM MARGIN. Your entered answer should have a strict specific format, having SEMICOLON (;) AFTER MATLAB statement; WITHOUT ANY SPACES; use SMALL letter "m" for the value of the maximum margin. Round its value and enter as answer with TWO DIGITS after the dot. Enter all two digits after the dot, even if the last digits are given with zeros. For example, for the demo in Consultation Notes, the answer for "m" should be in the format:
m=5.66;
(3) In the THIRD answer window ENTER (using "cut-and-paste" method) your MATLAB script the FIRST & SECOND answers of this Task.
Figure-1: Figure-1: Example from Consultation Wk 9. Plotted 2D data points for two classes, with superimposed three Support Vectors, Hyperplane and Negative/Positive Margin Planes (Lines) and the Scaled Equation of the Hyperplane shown in the Title of the figure. Attempt to produce similar plot, Task-1: FIRST ANSWER WINDOW: SUBMIT YOUR calculated values "a","b" and "c"*
Must exactly match pattern below in quotes (but without quotes). You may wish to "cut-and-paste" it for further modification with your own calculated numbers. Do not use signs "plus" for positive values. In case of negative numbers, please, use the same sign "minus", as in this template: "a=0.2500; b=-0.2500; c=-0.7500;"
10 points
Your answer
Task-1: SECOND ANSWER WINDOW: SUBMIT YOUR calculated value "m"*
Must exactly match pattern in quotes (but without quotes): "m=5.66;" You may wish to "cut-and-paste" it for further modification with your own calculated numbers. Do not use spaces and sign "plus" in the answer.
10 points using your data.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions