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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started