Question: Question 4. SVC and classification margin The Iris dataset defined in the above cells is linearly separable. Q4-1. Use a linear SVC to learn a

Question 4. SVC and classification margin

The Iris dataset defined in the above cells is linearly separable.

Q4-1. Use a linear SVC to learn a hyperplane =11+22+ that maximizes the margin for this Iris dataset. In your answer, specify a setting for the hyperparameter that reduces the amount of regularization (that is, incentivizes very small slacks).

Q4-2. Extract the coefficients and the intercept from the learned SVC. Find the the 2-norm of : let =2 . [Hint: Read the documentation in order to access the coefficients.]

Q4-3. Set / and / . This changes the numerical definition of the separation line, but the line is still the same.

Q4-4. With the new and , calculate for each point in our dataset. This will give a range of values; let be the smallest of these in absolute value. This is the margin. (In fact, there should be two points 1 and 2 of different labels, that give 1= and 1= .)

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!