# Can simple vector distance work as a SVM kernel?

I'm considering using the following simple function as an SVM kernel. It basically computes the distance between the 2 input vectors (norm):

$K(\vec{x}_1, \vec{x}_2) = \left\| \vec{x}_1- \vec{x}_2 \right\|$, where $\vec{x}_1$ and $\vec{x}_2$ are $N$-dimensional vectors.

I'm not familiar with documentation of such a kernel.

Is it valid? Anyone experienced with such a kernel?

-

No, this kernel doesn't give a positive (semi-) definite Gram matrix, so it is not a valid kernel (the first randomly generated Gram matrix $\matrix{K}$ and vector $\vec{v}$ I tried gave $\vec{v}'\matrix{K}\vec{v} < 0$ so $\matrix{K}$ isn't positive semi-definite. If you infer from that that I am an engineer - you are correct! ;o).
ISTR that Kernel functions need to be "diagonally dominant", i.e. the largest magnitude element in any row or column needs to be the one on the principal diagonal, which won't be true here as the principal diagonal is all zeros (the distance from any point to itself being zero). This is guaranteed for the RBF kernel as taking the negative exponential of the distance can never be greater than 1, which ocurrs when $\vec{x}_1$ and $\vec{x}_2$ are the same. Note however if the kernel is too diagonally dominant then it is likely to lead to over-fitting.