Bliss
Bliss

Reputation: 438

SVM Vector-Distance Kernel: Valid? Experience?

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

K(X1, X2) = || X1 - X2 ||, where X1 and X2 are N-dimensional vectors.

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

Is is valid? Anyone experienced with such a kernel?

Upvotes: 2

Views: 1059

Answers (2)

Nicolas78
Nicolas78

Reputation: 5144

This is a distance, ie smaller is better. A kernel is a similarity function, ie larger is better. 1-(||x1-x2||/maxdist) might be a kernel if you can define maxdist (eg by normalizing x1 and x2)

Upvotes: 1

Niki
Niki

Reputation: 15867

I've just looked up that kernels have to satisfy the Cauchy Schwarz Inequality:

|k(x1,x2)|^2 <= k(x1,x1) * k(x2,x2)

Euclidean distance doesn't satisfy this, so I don't think it's a valid kernel for SVMs.

Upvotes: 3

Related Questions