74.7k views
2 votes
A kernel is an efficient way to write out an inner product between two feature vectors computed from a pair of input vectors as follows:

K(x, y) = φ(x)Tφ(y).

Assume that both inputs are 2-dimensional and write out the explicit mapping

φ that mimics the kernel value for a 3rd-order polynomial kernel as follows:

K(x, y) = (xTy + 1)^3.

User VvdL
by
9.0k points

2 Answers

6 votes

Final Answer:


\[ \phi(x) = \begin{bmatrix} x_1^2 \\ √(2)x_1x_2 \\ x_2^2 \\ √(2)x_1 \\ √(2)x_2 \\ 1 \end{bmatrix} \]

Step-by-step explanation:

The 3rd-order polynomial kernel can be expressed as:


\[ K(x, y) = (x^T y + 1)^3 \].

To find the explicit mapping \(\phi\), we can use the binomial expansion:


\[ (a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3 \].

For our kernel,
\(a = 1\) and
\(b = x^T y\). Expanding, we get:


\[ K(x, y) = (1 + x^T y)^3 = 1 + 3(x^T y) + 3(x^T y)^2 + (x^T y)^3 \].

Now, express this in terms of the feature vector
\(\phi(x)\):


\[ \phi(x)^T \phi(y) = 1 + √(3)x_1y_1 + 3x_1x_2y_1y_2 + √(3)x_2y_2 + (x^T y)^3 \].

Comparing coefficients, we find
\(\phi(x)\):


\[ \phi(x) = \begin{bmatrix} x_1^2 \\ √(2)x_1x_2 \\ x_2^2 \\ √(2)x_1 \\ √(2)x_2 \\ 1 \end{bmatrix} \].

This mapping
\(\phi\) allows us to compute the inner product efficiently as
\(K(x, y) = \phi(x)^T \phi(y)\).

User Gustav Delius
by
8.3k points
2 votes

Final answer:

A kernel is a function that allows us to compute the inner product between two feature vectors. The explicit mapping for a 3rd-order polynomial kernel can be written as: φ(x) = (xTy + 1)^3.

Step-by-step explanation:

A kernel is a function that allows us to compute the inner product between two feature vectors. The explicit mapping φ for a 3rd-order polynomial kernel can be written as: φ(x) = (xTy + 1)3

This means that the mapping φ takes each 2-dimensional input vector x and y, computes their inner product xTy, adds 1, and then raises the result to the power of 3.

User Geeks
by
8.2k points