3

I am just getting into machine learning and I am kind of confused about how to show the corresponding feature map for a kernel. For example, how would I show the following feature map for this kernel? $K(x,y) = (x \cdot y)^3 + x \cdot y$ Any help would be appreciated. Where x and y are in 2d x = (x1,x2) y = (y1,y2)

Thank you.

Jakub Bartczuk
  • 5,786
  • 1
  • 16
  • 36
skidjoe
  • 211
  • Still struggling to wrap my head around this problem, any help would be highly appreciated! Thank you. – skidjoe Oct 19 '18 at 12:12

1 Answers1

2

I understand you ask about $K(x, y) = (x\cdot y)^3 + x \cdot y$ Where dot denotes dot product. Then

$K(x, y) = \phi(x) \cdot \phi(y)$

Where $\phi(x) = (\phi_{poly_3}(x^3), x)$

By $\phi_{poly_3}$ I mean polynomial kernel of order 3. You can find definitions for such kernels online.

In general if $K$ is a sum of smaller kernels (which $K$ is, since $K(x,y) = K_1(x, y) + K_2(x, y)$ where $K_1(x, y) = (x\cdot y)^3$ and $K_2(x, y) = x \cdot y$)

your feature space will be just cartesian product of feature spaces of feature maps corresponding to $K_1$ and $K_2$

$K(x, y) = K_1(x, y) + K_2(x, y) = \phi_1(x) \cdot \phi_1(y) + \phi_2(x),\cdot \phi_2(y) = \phi(x) \cdot \phi(y) $

Where $\phi(x) = (\phi_1(x), \phi_2(x))$ (I mean concatenation here, so that if $x_1 \in \mathbb{R}^n$ and $x_2 \in \mathbb{R}^m$, then $(x_1, x_2)$ can be naturally interpreted as element of $\mathbb{R}^{n+m}$).

Jakub Bartczuk
  • 5,786
  • 1
  • 16
  • 36