Loading [MathJax]/jax/output/HTML-CSS/jax.js

Information

Author(s) Pierre Dupont, Benoit Ronval
Deadline 09/03/2025 23:00:00
Submission limit No limitation

Sign in

A2.1 - Linear Discriminants and SVMs: theory

This task will be graded after the deadline


Question 1: Separating hyperplanes

We consider a binary classification problem in R2. The training set is made of 5 examples described in the table below. Each training example is represented by one row in this table. The two first columns give the coordinates of each example while the last column is the class label. We are interested in a SVM classifier built from this training set. We consider in particular the maximal margin hyperplane solution in the original input space.

x1 x2 Class label
0 3 +
3 0
2 1
0 2 +
3 3 +

Represent graphically the 5 training examples in R2 and compute the maximal margin hyperplane. You are not supposed to compute this decision boundary by solving the full optimization problem on paper. You are supposed to reason geometrically in order to determine the solution.

What is the equation of the maximal margin hyperplane (this can also be computed easily from the geometry of the problem)?

Use the same format as in the following example (mind the spaces, and round to 1 decimal each coefficient): + 1.0 x1 - 5.0 x2 - 6.0 = 0

Question 2: Separating hyperplanes (continued)

For the classifier defined in the previous question, what is the predicted class of the following test example?

x1=1x2=2
Question 3: Separating hyperplanes (continued)

Which are the support vectors for the model estimated in question 1?

Question 4: Separating hyperplanes (continued)

Which of the following hyperplanes perfectly separate the training data without possibly being the maximal margin solution?

Select all correct answers.

Question 5: Separating hyperplanes (continued)

Which additional training example(s) would result in the two classes no longer being separable by a hyperplane?

Here you should consider such additional training example one at a time, on top of the original 5 training examples from question 1.

Select all good answers.

Question 6: The kernel trick

We consider an input space made of real vectors in R2 (two-dimensional real vectors) and a polynomial kernel k:R2×R2R defined as follows:

k(xi,xj)=(xi,xj+1)3withxi,xjR2

What mathematical projection ϕ would map an input vector x=[x1x2] to this new feature space?

Select all the elements that are equal to a dimension of ϕ(x).

Question 7: The kernel trick (continued)

Consider the 2D XOR problem:

x1=[11], y1=0x2=[11], y2=1x3=[11], y3=1x4=[11], y4=0

Select all valid affirmations.

Question 8: The kernel trick (continued)

Consider the following kernel:

k(xi,xj)=(xi,xj)3withxi,xjR2

What is the corresponding projection?

Select all the elements that are part of the projection.

Question 9: The kernel trick (continued)

Is the XOR data from question 7 linearly separable in the feature space defined by this kernel?

Question 10: Non-linear discriminants

We consider the following training set of points represented in a one dimensional space R:

https://inginious.info.ucl.ac.be/course/LINFO2262/A2-1/q10.png

What is the form of a linear discriminant lying in such a 1D space R?

Select all valid affirmations.

Question 11: Non-linear discriminants (continued)

Suppose one would consider the following kernel: k(xi,xj)=(xi,xj+1)2 and one would look for a maximal margin hyperplane in the feature space induced by this kernel. With a proper choice of the regularization constant (C=100), a solver for the dual problem on this training set returns the following α values, according to the order of the training points in the above table (see question 10).

α1=0α2=2.5α3=0α4=7.333α5=4.833

What is the equation of the discriminant function g(x) (in the input space) which is used by this model to classify any new point xR.

Use the same format as in the following example (mind the spaces, and round to 2 decimals each coefficient): + 2.54 x^2 - 5.45 x - 6.67

Question 12: Non-linear discriminants (continued)

Use the discriminant function found in the previous question on the 1D data.

Select all valid affirmations