0
$\begingroup$

I have a question regarding my machine learning lecture where we had to decide whether $$K(x,y)=x_1y_1-x_2y_2$$ is a valid kernel (e.g. for a SVM). My intuition would say that it is a valid kernel since we can display it with: $$\Phi(x)=(x_1, ix_2)\implies K(x,y)=\Phi(x)\Phi(y)$$ with $i$ being the imaginary number. Is that right?

$\endgroup$
0
$\begingroup$

Kernels are considered valid if they are positive-definite, so we must have $$ \sum_{i=1}^n \sum_{j=1}^n c_i c_j K(x_i, x_j) \ge 0 $$ for all $n \in \mathbb{N}$ and $c_1, \dots, c_n \in \mathbb{R}$ and (in your case) all $x^1, \dots, x^n \in \mathbb{R}^2.$

Letting $n=1$ and $c_1 = 1$ and $x^1 = (0, 1)$ shows that $K$ is not positive-definite, since $$ K\big((0,1), (0,1)\big) = 0\times 0 - 1\times 1 = -1. $$

The problem with your approach is that you define $\Phi$ on $\mathbb{C}$ but write $K$ as the dot product for real-valued vectors. The feature map argument for positive definite vectors only works if the product is an inner product on $\Phi$'s codomain. The dot product for real-valued vectors is not an inner product on $\mathbb{C}^2$ (because $i\cdot i = -1 < 0$). You would have to use the generalized dot product $x \cdot y = \sum_i x_i \overline{y_i}$, or another inner product on $\mathbb{C}^2$.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.