0

I have an exercise in my book, which I'm not sure if I have answered correctly. Here's the exercise:

For the function $K: \mathbb{R}^2\times \mathbb{R}^2\to \mathbb{R}$ such that $$K(x,t)=x^TDt$$, where $$D=\begin{pmatrix} -1 && 2 \\ 2 &&4 \end{pmatrix}$$

Determine whether the function is a valid kernel (i.e., the kernel can be written as an inner product in some feature space) and when the answer is positive derive an associated feature map representation.

In this question, it is said that we have to check that the funciton $k(x,t)$ is symmetric and also whether it is positive definite. So, the function is symmetric. We need to check if it's PSD.

We check it by inspecting for an "inner-product" representation. I would like to find a $\phi(a)$, such that $k(x,t)=\phi(x)^T\phi(t)$. Well, $$\phi(a)=(ia_1,\sqrt{2}a_1,\sqrt{2}a_2,2a_2)^T$$

Hence, $K$ is a valid kernel.

EDIT

There is no such function, because the indices in $K(x,t)=x^TDt=-x_1t_1+2x_2t_1+2x_1t_2+4x_2t_2$ are "mixed", i.e., $x_1$ is multiplied by $t_2$, so there is no such function $\phi(a)$.

Hence $K$ is not a valid kernel.

Is this correct?

Slim Shady
  • 203
  • 9

1 Answers1

2

Checking $K((1,0), (1,0)) < 0$ rules out that the possibility that it can be a kernel.

Checking whether $x^TDx$ is a valid kernel is equivalent to checking if $D$ is positive semidefinite.

Mixing indices can occur in matrix in the expression of $K(x,t)$, for example if $D=\begin{bmatrix} 4 & 2 \\ 2 & 4\end{bmatrix}$, then $K$ is a valid kernel since it is positive semidefnite.

Siong Thye Goh
  • 6,431
  • 3
  • 17
  • 28
  • When you say that checking whether $K(x,y)$ is a kernel is a question of whether $D$ is positive SD. But why is that so? I know that if $D$ is psd then $K$ is a kernel, but why would the converse be true? – Slim Shady Oct 26 '21 at 11:06
  • 1
    Suppose $D$ is not positive semidefinite, then it is possible to find $x$ such that $x^TDx < 0$, which violate Mercer's theorem. – Siong Thye Goh Oct 26 '21 at 16:05
  • oh yes, that's true. thanks for the answer! – Slim Shady Oct 26 '21 at 16:43