QuantumCore

Hands-on lab · 1 step

The feature space of a polynomial kernel

Read off the explicit feature space of the inhomogeneous quadratic kernel k(x,x′)=(x⊤x′+1)2k(x,x')=(x^\top x'+1)^2 on R2\mathbb{R}^2 and evaluate the kernel at a pair of points, confirming that the kernel trick and the explicit inner product ϕ(x)⊤ϕ(x′)\phi(x)^\top\phi(x') give the same number.

0/1 step passedBest score 0/100

Step 1: Dimension and kernel value

Consider the polynomial kernel on R2\mathbb{R}^2

k(x,x′)=(x⊤x′+1)2,x=(x1,x2), x′=(x1′,x2′).k(x,x')=\big(x^\top x'+1\big)^2,\qquad x=(x_1,x_2),\ x'=(x'_1,x'_2).

(a) Give dim⁡F\dim\mathcal F, the dimension of the feature space of the explicit feature map ϕ\phi whose coordinates are the distinct monomials produced by expanding the square — equivalently the dimension of the reproducing kernel Hilbert space Hk\mathcal H_k, the smallest feature space any feature map of this kernel can have.

(b) Give k(x,x′)k(x,x') for x=(1,2)x=(1,2) and x′=(3,−1)x'=(3,-1).

Both values are graded together with absolute tolerance 10−910^{-9}; expressions such as (1*3+2*(-1)+1)^2 are accepted.

Enter exact expressions or decimals, e.g. 1/sqrt(2), pi/3. Values must be real.

enter a value
enter a value
Fill every field with a valid expression.